error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
原创 52cxy 07-25 10:55 回复数:1

error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

共1条回答
52cxy·2024/07/25

增加--target es6选项,默认是es5,而es5不支持Map。

tsc --target es6 hello.ts

评论 举报
我要回答