Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
5 tasks done
rbirkgit opened this issue Aug 22, 2023 · 1 comment
Open
5 tasks done

Comments

@rbirkgit
Copy link

rbirkgit commented Aug 22, 2023

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.

@rbirkgit
Copy link
Author

Updating to angular 16, the error goes away. I guess ng2-dragula is for ang16 only?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant