-
Notifications
You must be signed in to change notification settings - Fork 13k
Description
hi,
I write a tsconfig.json
{ "compilerOptions": { "module": "commonjs", "noImplicitAny": true, "removeComments": true, "preserveConstEnums": true, "strict":true, "sourceMap": false, "target": "es2015", "lib": ["es2015"], "types": ["node"] }, "files": [ "index.ts" ], }
, and try to compile my code.
But I got a error in vsCode
error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
When i use command tsc index.ts --lib ES6
,It's ok ;
Why the tsconfig.json is useless in compiling phase?
I can't find TS2583 and TS2704 in errorCode Mappings