typescript tsc is not excluding @types/corejs
typescript tsc is not excluding @types/corejs
Tsconfig:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noEmitHelpers": true,
"lib": [
"es6",
"dom"
],
"types": [
"hammerjs",
"jasmine",
"node",
"selenium-webdriver",
"webpack",
"core-js",
"google-maps"
]
},
"exclude": [
"node_modules"
"e2e"
],
"include": [
"src/**/*"
],
"filesGlob": [
"./src/**/*.ts",
"./test/**/*.ts",
"!./node_modules/**/*.ts",
"./src/custom-typings.d.ts"
],
}
当执行tsc时,我得到以下错误:
node_modules/@types/core js/index.d.ts(262,5(:错误TS2687:"flags"的所有声明都必须具有相同的修饰符。node_modules/@types/core js/index.d.ts(276,5(:错误TS2687:"EPSILON"的所有声明都必须具有相同的修饰符。node_modules/@types/core js/index.d.ts(311,5(:错误TS2687:"MAX_SAFE_INTEGER"的所有声明都必须具有相同的修饰符。node_modules/@types/core js/index.d.ts(318,5(:错误TS2687:"MIN_SAFE_INTEGER"的所有声明都必须具有相同的修饰符。node_modules/@types/core js/index.d.ts(457.5(:错误TS2403:后续变量声明必须具有相同的类型。变量"[Symbol.toStringTag]"的类型必须为"Symbol",但此处的类型为"string"。node_modules/@types/core js/index.d.ts(457.5(:错误TS2687:"[Symbol.toStringTag]"的所有声明都必须具有相同的修饰符。node_modules/@types/core js/index.d.ts(464,5(:错误TS2687:"prototype"的所有声明都必须具有相同的修饰符。node_modules/@types/core js/index.d.ts(492,5(:错误TS2687:"hasInstance"的所有声明都必须具有相同的修饰符。node_modules/@types/core js/index.d.ts(498,5(:错误TS2687:"isConcatSpreadable"的所有声明都必须具有相同的修饰符。node_modules/@types/core js/index.d.ts(504,5(:错误TS2687:"迭代器"的所有声明都必须具有相同的修饰符。node_modules/@types/core js/index.d.ts(510,5(:错误TS2687:的所有声明
为什么在执行tsc命令时不忽略node_modules。我在2.0.3版本中使用typescript
tsconfig.json
文件在"types"
属性中列出core-js
。这指示编译器包含node_module'@types'core-js
。如果您不需要它,请删除该条目。
请参阅http://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-关于@types
和tsconfig.json
中的types
的更多细节。
- 在KeystoneJS中为Types.Money设置默认值
- Google Maps JS API v3 - Add Map Types
- Javascript assertion libraries - chai vs check-types
- 当我运行node app.js命令时,它会给我错误`ENOENT,.mime.types上没有这样的文件或目录
- 是否存在包含所有MouseEvent-Types的枚举
- 如何将字符串转换为TYPES.LPTSTR.targetType.array
- typescript tsc is not excluding @types/corejs
- 在哪里可以获得单个lodash包的@types
- AngularJS: angular-拖放列表dnd-allowed-types在匹配dnd-type时不会求值为tru
- Incovertable types; Canot cast 'android.view.View' t
- Using Typescript 2 @Types with typescript 1.8.10
- 为什么我得到'/base/src/tests/core/types.tests没有时间戳!'
- types .json中的globalDependencies和globalDevDependencies有什么区别?
- 上一个方法是什么?它是jQuery还是coreJS或其他库
- ngFor not updating in IE 11 (RC4 with CoreJS)