typescript - tsc 不排除 node_modules

标签 typescript angular tsc

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  },
  "exclude": [
    "node_modules",
    "typings/main",
    "typings/main.d.ts"
  ]
}

我正在尝试将 angular2/beta8 应用程序升级到 RC1,并且我这样做基本上是根据快速入门指南进行重构。

我将其 tsconfig.json 复制到我的项目目录中。我想我已经准备好了其他一切,但是当我运行 tsc 时,我在 node_modules 文件夹中的文件中遇到了各种错误。为什么它一开始还要往里面看?

最佳答案

tsconfig.json 中添加此选项

{
  "compilerOptions": {
    "skipLibCheck": true
  },
}

关于typescript - tsc 不排除 node_modules,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37309510/

相关文章:

TypeScript 2.1.4 webpack ts-loader 中的重大变化

typescript - TS2339 : Property does not exist on type {}

reactjs - 使用 React 和 TypeScript 时如何正确输入 @connect?

css - 使用内联 CSS 设计组件样式 - Ionic2、AngularJS

javascript - 使用 JsDoc 转换 Typescript

typescript - 构建类注册表 : Cannot use 'new' with an expression whose type lacks a call or construct signature

通用 `keyof` `extends keyof` `typeof` 和其他的 Typescript 混淆

angular - 无法以 Angular 5 从一页导航到另一页

html - 将 Ionic 3 列表中的一项显示到另一页

javascript - Angular ,鼠标悬停速度不稳定?