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 '"mathjax"' is incompatible with index signature #32

Open
roy-ganz opened this issue May 8, 2024 · 0 comments
Open

Property '"mathjax"' is incompatible with index signature #32

roy-ganz opened this issue May 8, 2024 · 0 comments

Comments

@roy-ganz
Copy link

roy-ganz commented May 8, 2024

Hi,
thanks for your work on this directive!

I run into the following Typescript error when I build my project with your version 2.2.1:

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

14     static ɵdir: i0.ɵɵDirectiveDeclaration<MathjaxDirective, "mathjax,[mathjax]", never, { "mathjax": { "alias": "mathjax"; "required": false; }; }, {}, never, never, false, never>;

This error breaks my project build. As a workaround I'm able to ignore the error with // @ts-ignore on top line 14.

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