Skip to content

ERROR: TS 2583 ERROR:TS 2705 #29523

@wuhaoxiangfau

Description

@wuhaoxiangfau

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalRelates to another program, environment, or user action which we cannot control.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions