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
Condition doesn`t check undefined when direct import #17189
TypeScript Version: Version 2.4.1
With --strictNullChecks flag
Code
File A
exportletc:number|undefined
File B
import{c}from'./A'import*asAfrom'./A'functionfoo(a:number){}if(c){foo(c)// B.ts(8,6): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. Type 'undefined' is not assignable to type 'number'.}if(A.c){foo(A.c)// All right}
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Activity
mhegazy commentedon Sep 7, 2017
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.