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 '"title"' is incompatible with index signature. #180

Open
emmettprexus opened this issue Jan 17, 2024 · 0 comments
Open

Property '"title"' is incompatible with index signature. #180

emmettprexus opened this issue Jan 17, 2024 · 0 comments

Comments

@emmettprexus
Copy link

emmettprexus commented Jan 17, 2024

I'm getting an error with angular2-hotkeys before I'm even starting using it:

Error: node_modules/angular2-hotkeys/lib/hotkeys-cheatsheet/hotkeys-cheatsheet.component.d.ts:17:101 - error TS2344: Type '{ title: { alias: "title"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
  Property '"title"' is incompatible with index signature.
    Type '{ alias: "title"; required: false; }' is not assignable to type 'string'.

17     static ɵcmp: i0.ɵɵComponentDeclaration<HotkeysCheatsheetComponent, "hotkeys-cheatsheet", never, { "title": { "alias": "title"; "required": false; }; }, {}, never, never, false, never>;
                                                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/angular2-hotkeys/lib/hotkeys.directive.d.ts:18:82 - error TS2344: Type '{ hotkeys: { alias: "hotkeys"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
  Property '"hotkeys"' is incompatible with index signature.
    Type '{ alias: "hotkeys"; required: false; }' is not assignable to type 'string'.

18     static ɵdir: i0.ɵɵDirectiveDeclaration<HotkeysDirective, "[hotkeys]", never, { "hotkeys": { "alias": "hotkeys"; "required": false; }; }, {}, never, never, false, never>;
                                                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I haven't been able to figure out if it's some typescript setting being more strict in my project vs the library - but I'm at least able to continue by using 'skipLibCheck' in my tsconfig. I'd just rather not have it do that :)

Any hints?

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