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

Property '"options"' is incompatible with index signature #702

Open
skrappyzz opened this issue Jul 25, 2024 · 6 comments
Open

Property '"options"' is incompatible with index signature #702

skrappyzz opened this issue Jul 25, 2024 · 6 comments

Comments

@skrappyzz
Copy link

Describe the bug
When import { SimplebarAngularModule } from "simplebar-angular"

To Reproduce
Steps to reproduce the behavior:
1.Install simplebar-angular by using "npm install simplebar-angular --save"
2. Add import to app.module.ts as described in the simplebar-angular documentation ( import { SimplebarAngularModule } from 'simplebar-angular'
4. See error in cli: Error: node_modules/simplebar-angular/lib/simplebar-angular.component.d.ts:16:95 - error TS2344: Type '{ options: { alias: "options"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
Property '"options"' is incompatible with index signature.
Type '{ alias: "options"; required: false; }' is not assignable to type 'string'.

static ɵcmp: i0.ɵɵComponentDeclaration<SimplebarAngularComponent, "ngx-simplebar", never, { "options": { "alias": "options"; "required": false; }; }, {}, never, ["*"], false, never>;

Expected behavior
A clear and concise description of what you expected to happen.

Environment

Software Version(s)
SimpleBar 3.2.5 and 3.2.6
Browser Chrome
npm 10.7.0
Operating System Windows 10
@letovsk1y
Copy link

I have the same issue, but it can be fixed by installing simplebar-angular 3.2.4 version

@skrappyzz
Copy link
Author

I have the same issue, but it can be fixed by installing simplebar-angular 3.2.4 version

Yep, I mentioned it in the description that affected versions are 3.2.5 and 3.2.6

@Grsmto
Copy link
Owner

Grsmto commented Oct 23, 2024

There's zero change in types or any angular code between 3.2.4 and 3.2.5 so I have absolutely no clue why this would be happening all of a sudden.
Also I tried running the angular example in the repo but couldn't get it to work for some reason, spent a good 45min on it. If someone has any idea why this typing error magically happened I would be happy to fix it.

@skrappyzz
Copy link
Author

Hey @Grsmto, I just compared versions 3.2.4 and 3.2.5 and noticed this change: 9a2cdc9#diff-874e3e4b59bff724c2ffc471287446a81ee8296ae357129c8e06032cd2b07939R9 Could this be the source of the issue?

@Grsmto
Copy link
Owner

Grsmto commented Oct 29, 2024

I don't see how, this is the vanilla js package, the angular plugin does not have a dependency on this file...

@Haves1001
Copy link

I actually have this issue also appearing when using 3.2.4 up till 3.0.0 with Angular 16 - so maybe a change introduced earlier?

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

4 participants