type-plus icon indicating copy to clipboard operation
type-plus copied to clipboard

Goodbye ..., welcome customizable types

Open unional opened this issue 11 months ago • 0 comments

The filter vs validate types are useful only if not modified. Also it promotes bad usage as the If<Condition, Then, Else> enclosed type logic can lead to infinite result due to the lack of actual conditional type support.

It's better to return ThenType and ElseType and then Foo<...> extends infer R? R extends ThenType ? ... : ... etc.

The syntax and implementation still needs some clean up.

But the general direction should be good.

All types should follow Foo<...inputs, Options>: R signature.

unional avatar Jul 10 '23 20:07 unional