当前位置: 首页 > 工具软件 > esnext > 使用案例 >

仅当 “module“ 选项设置为 “esnext“ 或 “system“,并且 “target“ 选项设置为 “es2017“ 或更高版本时,才允许使用顶级 “await“ 表达式。ts(1378)

漆雕安晏
2023-12-01

仅当 “module” 选项设置为 “esnext” 或 “system”,并且 “target” 选项设置为 “es2017” 或更高版本时,才允许使用顶级 “await” 表达式。ts(1378)

{
  "compileOnSave": true,
  "compilerOptions": {
    "moduleResolution": "node",
    "alwaysStrict": true,
    "charset": "utf8",
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "inlineSourceMap": true,
    "module": "esnext", // 修改 commonjs -- esnext
    "newLine": "lf",
    "noFallthroughCasesInSwitch": true,
    "noImplicitAny": false,
    "noImplicitThis": true,
    "noUnusedLocals": false,
    "outDir": "dist",
    "pretty": true,
    "skipLibCheck": true,
    "strict": true,
    "strictPropertyInitialization": false,
    "stripInternal": true,
    "importHelpers": true,
    "target": "ES2018"
  },
  "exclude": [
    "app/public",
    "app/views",
    "dist",
    "node_modules",
    "test"
  ]
}


 类似资料: