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
IsTuple returns Type | never instead of true | false but should another way round
Why
All type checkers (IsAny, IsNever, IsUnknown and IsTuple) expect to return true or false.
There are other types Exact and NonEmptyObject that need to return Type | never as they are used to validate whether 1. types are exact and 2. type is empty object. never provides a way to show TS error in these cases.
The text was updated successfully, but these errors were encountered:
Summary
IsTuple
returnsType | never
instead oftrue | false
but should another way roundWhy
All type checkers (
IsAny
,IsNever
,IsUnknown
andIsTuple
) expect to returntrue
orfalse
.There are other types
Exact
andNonEmptyObject
that need to returnType | never
as they are used to validate whether 1. types are exact and 2. type is empty object.never
provides a way to show TS error in these cases.The text was updated successfully, but these errors were encountered: