gvergnaud / hotscript

A library of composable functions for the type-level! Transform your TypeScript types in any way you want using functions you already know.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Object.set

Maggi64 opened this issue Β· comments

Hi, thank you for the library πŸ‘
How about we add Object.Set which is similar to Object.Update. But you can update and set new paths.

Call<Objects.Set<'a.b', 2>, { a: 1 }>;
// { a: { b: 2 }}

Hey, thanks for the feedback, the fact that Object.Update doesn't create new property is a bug actually, just fixed it! I'll publish a new release with the fix soon.

Publish as v1.0.11