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

Allow changing object property specifier (?) when updating it

jasonkuhrt opened this issue · comments

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}