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
//some-lib.d.ts
declare function foo():number | undefined
//a.ts
foo();
when somebody use some-lib.d.ts with tsc1.8 , they will got a exception some-lib.d.ts(1,33): error TS2304: Cannot find name 'undefined'. . And they will be confused because they may not know about strict-null features in TypeScript 2.0
So I think we should add a 'min-tsc-version' on d.ts file , for example :
//some-lib.d.ts
/// min-tsc-version : 2.0.0
declare function foo():number | undefined
We write some typescript code with ts2.0 features , and VSCode .
becauseof vscode use TypeScript 1.8.10 now , so my code will got some error message from tss 1.8 ( including in vscode ) .
If here is a " min-tsc-version " in tsconfig.json , VSCode could report a friendly error message to let developers set custom typescript-sdk path in VSCode
consider this code :
when somebody use
some-lib.d.ts
with tsc1.8 , they will got a exceptionsome-lib.d.ts(1,33): error TS2304: Cannot find name 'undefined'.
. And they will be confused because they may not know about strict-null features in TypeScript 2.0So I think we should add a 'min-tsc-version' on d.ts file , for example :
The text was updated successfully, but these errors were encountered: