isolatedModules‘ because it is considered a global script file. Add an import, export, or an empty
本人在项目中单独运行ts文件时候,遇到报错:“TS1208: ‘greeter.ts’ cannot be compiled under ‘–isolatedModules’ because it is considered a global script file. Add an import, export, or an empty ‘export {}’ statement to make it a module.”找到 tsconfig.json 文件,把 “isolatedModules”:
原创
2021-09-27 16:05:29 ·
4968 阅读 ·
2 评论