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

TypeScript Error After Updating to Latest Version of angular-froala-wysiwyg (4.4.0). #557

Open
KambagiriswamyBo-Kore opened this issue Jan 10, 2025 · 1 comment

Comments

@KambagiriswamyBo-Kore
Copy link

After the upgrading the latest version of angular-froala-wysiwyg (4.4.0), I encountered a build time error when trying to use the Froala editor in my Angular application. The error message is as follows:

`
Error: node_modules/angular-froala-wysiwyg/editor/editor.directive.d.ts:44:103 - error TS2344: Type '{ froalaEditor: { alias: "froalaEditor"; required: false; }; froalaModel: { alias: "froalaModel"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'.
Property '"froalaEditor"' is incompatible with index signature.
Type '{ alias: "froalaEditor"; required: false; }' is not assignable to type 'string'.

44 static ɵdir: i0.ɵɵDirectiveDeclaration<FroalaEditorDirective, "[froalaEditor]", ["froalaEditor"], { "froalaEditor": { "alias": "froalaEditor"; "required": false; }; "froalaModel": { "alias": "froalaModel"; "required": false; }; }, { "froalaModelChange": "froalaModelChange"; "froalaInit": "froalaInit"; }, never, never, false, never>;
`

Steps to Reproduce:

  1. Install the latest version of angular-froala-wysiwyg.
  2. Use the Froala editor in an Angular component with the froalaEditor and froalaModel directives.
  3. Build the project or run the TypeScript compiler.

Expected Behavior:
The TypeScript compiler should allow the code to compile without errors, similar to how it worked in earlier versions of the package.

Actual Behavior:
A TypeScript error is thrown due to the froalaEditor and froalaModel properties not being compatible with the expected type, which was not an issue in previous versions of the package.

Version Information:
angular-froala-wysiwyg: [Insert version here, e.g., 4.4.0]
Angular: [15.0.3]
TypeScript: [4.8.3]
Temporary Solution:
As a temporary workaround, I reverted to an earlier version of angular-froala-wysiwyg (4.3.1), and the issue was resolved.

It appears that the recent changes to the package may have introduced breaking changes in the TypeScript types.

Could you please investigate this issue or provide guidance on how to resolve it in the latest version? I would be happy to provide any additional information or details to assist in fixing this.

@msmallest
Copy link

Froala 4.3.1 has devDependencies on Angular 15 and TS 4.8.2 https://github.com/froala/angular-froala-wysiwyg/blob/v4.3.1/package.json

Froala 4.4 has devDependencies on Angular 19 and TS 5.6.3 https://github.com/froala/angular-froala-wysiwyg/blob/v4.4.0/package.json

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

2 participants