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.
3.38k stars 57 forks source link

Allow changing object property specifier (?) when updating it #112

Open jasonkuhrt opened 8 months ago

jasonkuhrt commented 8 months ago

The feature request is to make this possible:

$<Objects.update<'path', 1>, {path?:2}> // $ExpectType {path: 1}

That would be a breaking change, and doesn't support going the other direction. So probably a new function like this:

$<Objects.update<'path', 1>, Objects.updateSpecifier<'-?', 'path'>, {path?:2}> // $ExpectType {path: 1}