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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property '"autoGenerate"' is incompatible with index signature. #171

Closed
kar-21 opened this issue Jul 3, 2023 · 3 comments
Closed

Property '"autoGenerate"' is incompatible with index signature. #171

kar-21 opened this issue Jul 3, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@kar-21
Copy link

kar-21 commented Jul 3, 2023

馃悶 Property '"autoGenerate"' is incompatible with index signature.

Description

I am a type issue Property '"autoGenerate"' is incompatible with index signature. Type '{ alias: "preserveQueryParams"; required: false; }' is not assignable to type 'string' in the node_modules/xng-breadcrumb/lib/breadcrumb.component.d.ts:59:90

馃敩 Minimal Reproduction Steps

  • Added the xng-breadcrumb by executing yarn add xng-breadcrumb
  • Added BreadcrumbModule to the import of @NgModule of app.model.ts
  • Added <xng-breadcrumb></xng-breadcrumb> to the template of app.component.ts
  • Started local server using ng serve
  • Encountered this error
> Error: node_modules/xng-breadcrumb/lib/breadcrumb.component.d.ts:59:90 - error TS2344: Type '{ autoGenerate: ""; preserveQueryParams: { alias: "preserveQueryParams"; required: false; }; preserveFragment: { alias: "preserveFragment"; required: false; }; class: { alias: "class"; required: false; }; anchorTarget: { ...; }; separator: { ...; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
>   Property '"preserveQueryParams"' is incompatible with index signature.
>     Type '{ alias: "preserveQueryParams"; required: false; }' is not assignable to type 'string'.
> 
> 59     static 傻cmp: i0.傻傻ComponentDeclaration<BreadcrumbComponent, "xng-breadcrumb", never, { "autoGenerate": ''; "preserveQueryParams": { "alias": "preserveQueryParams"; "required": false; }; "preserveFragment": { "alias": "preserveFragment"; "required": false; }; "class": { "alias": "class"; "required": false; }; "anchorTarget": { "alias": "anchorTarget"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; }, {}, ["itemTemplate"], never, false, never>;

馃捇My Environment

Angular CLI: 15.2.0
xng-breadcrumb: 10.0.0

馃搩package.json

image

馃敟 Error

Error screenshot
image

Error Code from breadcrumb.component.d.ts
image

@kar-21 kar-21 added the bug Something isn't working label Jul 3, 2023
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Hello 馃憢 @kar-21
Thank you for raising an issue. We will investigate into the issue and get back to you as soon as possible. Please make sure you have given us as much context as possible.
Feel free to raise a PR if you can fix the issue. Check the local development guide

@kar-21
Copy link
Author

kar-21 commented Jul 3, 2023

I have downgraded the package to version9.0.0. It seems breadcrumb is working.
Not sure whether this is to do with compatibility of angular.

@udayvunnam
Copy link
Owner

Yes, this is a compatibility issue. See https://udayvunnam.github.io/xng-breadcrumb/#/angular-version-compatibility. Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants