本人在项目中单独运行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”: true, 改为 false