我在我的项目中收到了一堆关于库 d.ts 文件的语法问题,我想取消这些问题。我看到“skipLibCheck”选项可用,我在我的配置中将其设置为 true,但这没有区别:
ERROR in C:\Users\\***\Documents\GitHub\\***\node_modules\@types\leaflet\index.d.ts
[tsl] ERROR in C:\Users\\***\Documents\GitHub\\***\node_modules\@types\leaflet\index.d.ts(594,5)
TS7028: Unused label.
ERROR in C:\Users\\***\Documents\GitHub\\***\node_modules\@types\handlebars\index.d.ts
[tsl] ERROR in C:\Users\\***\Documents\GitHub\\***\node_modules\@types\handlebars\index.d.ts(22,31)
TS1005: ',' expected.
ERROR in C:\Users\\***\Documents\GitHub\\***\node_modules\@types\handlebars\index.d.ts
[tsl] ERROR in C:\Users\\***\Documents\GitHub\\***\node_modules\@types\handlebars\index.d.ts(24,32)
TS1005: ',' expected.
ERROR in C:\Users\\***\Documents\GitHub\\***\node_modules\@types\handlebars\index.d.ts
[tsl] ERROR in C:\Users\\***\Documents\GitHub\\***\node_modules\@types\handlebars\index.d.ts(99,40)
TS1005: ',' expected.
Run Code Online (Sandbox Code Playgroud)
我的 tsconfig:
{
"compilerOptions": {
"target": "es5",
"sourceMap": true,
"outDir": "./dist",
"rootDir": "../",
"noImplicitAny": false,
"noImplicitThis": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"pretty": true,
"removeComments": false,
"allowUnreachableCode": false,
"declaration": false,
"allowJs": true,
"module": "commonJs",
"typeRoots" : ["./typings/index.d.ts", "../../node_modules/@types"],
"skipLibCheck": true
},
"include": [
"./typings/index.d.ts",
"./app/**/*.module.ts",
"./app/**/*.run.ts",
"./app/**/*.routes.ts",
"./app/**/*.enum.ts",
"./app/**/*.controller.ts",
"./app/**/*.model.ts",
"./app/**/*.directive.ts",
"./app/**/*.component.ts",
"./app/**/*.filter.ts",
"./app/**/*.service.ts",
"./app/interfaces/**/*.ts"
],
"exclude": [
"dist"
]
}
Run Code Online (Sandbox Code Playgroud)
我正在使用最新版本的 webpack (3.11.0),skipLibCheck 标志应该在这里工作吗?
谢谢
归档时间: |
|
查看次数: |
1947 次 |
最近记录: |