After upgrading to Angular 16 from versions 14 and 15, I encountered an error when launching my app:
Error: node_modules/tinymce/tinymce.d.ts:864:42 - error TS2344: Type 'T' does not satisfy the constraint 'DialogData'.
864 onTabChange?: DialogTabChangeHandler<T>;
~
node_modules/tinymce/tinymce.d.ts:853:22
853 interface DialogSpec<T> {
~
This type parameter might need an `extends DialogData` constraint.
@angular-devkit/architect 0.1602.11
@angular-devkit/build-angular 16.2.11
@angular-devkit/core 16.2.11
@angular-devkit/schematics 16.2.11
@angular/cli 16.2.11
@schematics/angular 16.2.11
rxjs 7.8.1
typescript 4.9.3
tinymce 5.10.9
tslib 2.6.2
zone.js 0.13.3
Angular CLI: 16.2.11
Node: 18.16.1
Package Manager: npm 9.5.1
I've tried fixing it by modifying the file tinymce.d.ts at line 853 to: interface DialogSpec<T extends DialogData>, and it resolves the issue. However, after each npm install, the file gets restored, and my fix is lost. Unfortunately, I couldn't find any relevant documentation on this issue. Any help on a more permanent solution would be greatly appreciated.
By activating skipLibCheck in tsconfig.json it work, but not sure hiding these errors is the best idea.
"compilerOptions": {
...
"skipLibCheck": true,
...
}