valor-software/ng2-dragula

[bug report] Wrong type in dragula.directive.d.ts - Get compile error

rbirkgit opened this issue · 1 comments

REQUIRED: Before filing a bug report

Change each [ ] to [x] when you have done it.

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?