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
{// no errorconstarr1: Array<number>=['foo',1].filter((x): x is number=>typeofx==='number',);/* unexpected error:[ts]Type '(string | number)[]' is not assignable to type 'number[]'.Type 'string | number' is not assignable to type 'number'.Type 'string' is not assignable to type 'number'.*/constarr2: Array<number>=['foo',1].filter((x): x is number=>typeofx==='number').map(x=>x);// workaround. no errorconstarr3: Array<number>=['foo',1].filter((x: any): x is number=>typeofx==='number').map(x=>x);}
TypeScript Version: 2.6.1.
Code
Related ReactiveX/IxJS#162
The text was updated successfully, but these errors were encountered: