使用默认的启动角-Cli 7项目并按照这里描述的步骤执行:https://github.com/valor-software/ng2-dragula设置ng2-dragula,但编译失败。
ng2-dragula 2.1.0 (最新)。
详细信息:
ERROR in node_modules/ng2-dragula/dist/MockDrake.d.ts(41,5): error TS2416: Property 'on' in type 'MockDrake' is not assignable to the same property in base type 'DrakeWithModels'.
Type '(event: string, callback: Function) => void' is not assignable to type '(events: string, callback: Function) => Drake'.
Type 'void' is not assignable to type 'Drake'.
i 「wdm」: Failed to compile.Dev.系统信息:
Angular CLI: 7.0.3
Node: 8.11.4
OS: win32 x64
Angular: 7.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.10.3
@angular-devkit/build-angular 0.10.3
@angular-devkit/build-optimizer 0.10.3
@angular-devkit/build-webpack 0.10.3
@angular-devkit/core 7.0.3
@angular-devkit/schematics 7.0.3
@angular/cli 7.0.3
@ngtools/webpack 7.0.3
@schematics/angular 7.0.3
@schematics/update 0.10.3
rxjs 6.3.3
typescript 3.1.3
webpack 4.19.1发布于 2018-10-30 13:19:09
您可以通过安装@types/dragula来解决这个问题。
npm install @types/dragula@^2.1.33Dragula 2.1.0需要2.1.33。
请在github上查看此问题以获得更多信息:属性'on‘在类型'MockDrake’中不能分配给基类型'DrakeWithModels‘中的相同属性
发布于 2019-01-22 18:16:36
您可以通过安装@type/dragula来解决这个问题
npm安装@type/dragula@2.1.33--保存-dev
https://stackoverflow.com/questions/53064576
复制相似问题