有没有办法排除导入的包装类型?

时间:2017-10-18 02:05:17

标签: typescript typescript-typings typescript2.0

摘要

我有一个npm依赖项@progress/kendo-ui,它包含npm包中的typings,指向一个单独的index.d.ts文件。不幸的是,输入不正确并产生编译时错误。在解决这个问题时,剑道似乎有点慢,所以我试图快速缓解。使用Typescript版本2.5.3

问题

有没有办法排除这个特定模块的类型?在tsconfig文件中,我尝试过类似执行和排除等一些内容,但似乎无法弄清楚

Tsconfig文件

"compilerOptions": { "module": "amd", "target": "es5", "experimentalDecorators": true, "jsx": "react", "declaration": true, "baseUrl": ".", "importHelpers": true, "paths": { "tslib": [ "../node_modules/tslib/tslib.d.ts" ], "monaco": [ "../node_modules/monaco-editor/monaco.d.ts" ] }, "forceConsistentCasingInFileNames": true, "moduleResolution": "node" }, 和我的尝试修复 "typeAcquisition": { "enable": true, "exclude": [ "@progress/kendo-ui", "../node_modules/@progress/kendo-ui/index.d.ts", "../node_modules/@progress/kendo-ui", "node_modules/@progress/kendo-ui", "@progress", "kendo-ui" ] }, "exclude": [ "../node_modules/@progress/" ]

参考错误:

E:/Repos/ExperimentationUI/node_modules/@progress/kendo-ui/index.d.ts(1201,15): error TS2430: Interface 'DataSourceTransportWithFunctionOperations' incorrectly extends interface 'DataSourceTransport'. Types of property 'create' are incompatible. Type '(options: DataSourceTransportOptions) => void' has no properties in common with type 'DataSourceTransportCreate'.

0 个答案:

没有答案