type-plus
type-plus copied to clipboard
Goodbye ..., welcome customizable types
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.