ng2-dragula
ng2-dragula copied to clipboard
[bug report] Wrong type in dragula.directive.d.ts - Get compile error
REQUIRED: Before filing a bug report
Change each [ ] to [x] when you have done it.
- [x] My issue title starts with
[bug report] - [x] I have read the README, especially the 'classic blunders' section, and the dragula docs.
- [x] I have searched through the
ng2-dragulaissues for related problems, including closed issues. - [x] I have browsed through the issues labeled "future reference" for problems that have been solved before or have a known workaround.
- [x] I am using the latest version of
ng2-dragula.
Describe the bug (required)
I am using: Get typescript error of types not matching and cannot compile.
To Reproduce (required)
Install ng2-dragula 5.0.1, open the file dragula.directive.d.ts and in my editor I see typescript error. Also same error when building:
Property '"dragula"' is incompatible with index signature.
Type '{ alias: "dragula"; required: false; }' is not assignable to type 'string'.
Looking in Angular Corr I see the type should be:
InputMap extends {
[key: string]: string;
}
This does not match what ng2-dragula tries to use:
{ "dragula": { "alias": "dragula"; "required": false; }; "dragulaModel": { "alias": "dragulaModel"; "required": false; }; }
Screenshots (optional)
If applicable, add screenshots to help explain your problem.
Versions (required)
Please state which versions of the following packages you have installed:
@angular/core: [15.2.9]ng2-dragula: [5.0.1]
Maybe latest ng2-dragula is not compatible with Angular 15? It is hard to tell from readme which version to use. It says to use v2 for Ang <= 9 and to use current for ang 16, but not mentioning what to use for other versions of angular.
Updating to angular 16, the error goes away. I guess ng2-dragula is for ang16 only?