You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Types aren't values, and keeping types union-safe is a pretty big deal for broader usability. I should actually start testing for that, and ideally documenting it too.
The text was updated successfully, but these errors were encountered:
union types input: the result of a type function should equal include that of the union of the individual inputs (F<A|B> >= F<A>|F<B>, distributivity)?... though things like Indeterminate and its dependents would definitely not satisfy this, nor e.g. IsUnion... where does this discrepancy stem from? UnionHasKey?
which union-proof inputs can take never? seemingly all basic operators minus property access are never-proof. somehow & also failed, thought that's fixed since TS 2.5?
sub-types: given sub-types of the envisioned input (e.g. 'a' -> 'a' & string), the output should also extend that of the original (for A < B, F<A> < F<B>)
super-types: given super-types of the envisioned input, the output should also be a super-type of the original (for A > B, F<A> > F<B>)
prototypes: type functions should be tested for input involving methods on Object.prototype -- that is, for objects try having an explicit toString method, for string input, try toString.
Types aren't values, and keeping types union-safe is a pretty big deal for broader usability. I should actually start testing for that, and ideally documenting it too.
The text was updated successfully, but these errors were encountered: