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
{{ message }}
Repository navigation
Can't use is type asserting function as predicate parameter #19642
typeT1={t: 1};typeT2={t: 2};functionisT1(x: any): x is T1{returnx.t===1;}functionisT2(x: any): x is T2{returnx.t===2;}functionf(p: typeofisT1|typeofisT2){}f(isT1);f(isT2);// fails
Argument of type '(x: any) => x is T2' is not assignable to parameter of type '(x: any) => x is T1'.
Type predicate 'x is T2' is not assignable to 'x is T1'.
Type 'T2' is not assignable to type 'T1'.
Types of property 't' are incompatible.
Type '2' is not assignable to type '1'
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Activity
Add test for #19642
typescript-bot commentedon Nov 16, 2017
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Lazily compute signature type predicates (#17600)