Skip to content

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

@KambagiriswamyBo-Kore

Description

@KambagiriswamyBo-Kore

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions