sajivkumar / mathjax-angular

Mathjax 3 for angular
10 stars 13 forks source link

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

Open roy-ganz opened 6 months ago

roy-ganz commented 6 months ago

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.