tsconfig.spec.json 是做什么的?

What does tsconfig.spec.json do?

我看过 this and this 个帖子,它们让我理解了 tsconfig.app.jsontsconfig.json

我有一个 angular 应用程序,其中包含 tsconfig.app.jsontsconfig.jsontsconfig.spec.json

tsconfig.spec.json的作用是什么? tsconfig.spec.json中的'spec'代表什么?

这是应用程序测试的 TypeScript 配置。

例如下面你说的代码

"types": ["jasmine", "node"]

我会在nodejs环境下使用jasmine进行测试

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/spec",
    "module": "commonjs",
    "target": "es5",
    "baseUrl": "",
    "types": [
      "jasmine",
      "node"
    ]
  },
  "files": [
    "test.ts",
    "polyfills.ts"
  ],
  "include": [
    "**/*.spec.ts",
    "**/*.d.ts"
  ]
}