[BUG] Unable to build latest release (2.8.2)
See original GitHub issue🐞 Bug report
Description
I get the following errors when building release 2.8.2:
ERROR: node_modules/@taiga-ui/core/components/dialog/dialog.service.d.ts:7:24 - error TS2416: Property ‘component’ in type ‘TuiDialogService’ is not assignable to the same property in base type ‘AbstractTuiDialogService<TuiDialogOptions<any>>’. Type ‘PolymorpheusComponent<TuiDialogComponent<unknown, unknown>, object>’ is not assignable to type ‘PolymorpheusContent<TuiDialog<TuiDialogOptions<any>, any>>’. Type ‘PolymorpheusComponent<TuiDialogComponent<unknown, unknown>, object>’ is not assignable to type ‘PolymorpheusComponent<object, TuiDialog<TuiDialogOptions<any>, any>>’. Types have separate declarations of a private property ‘injector’.
7 protected readonly component: PolymorpheusComponent<TuiDialogComponent<unknown, unknown>, object>; ~~~~~~~~~
An unhandled exception occurred: node_modules/@taiga-ui/core/components/dialog/dialog.service.d.ts:7:24 - error TS2416: Property ‘component’ in type ‘TuiDialogService’ is not assignable to the same property in base type ‘AbstractTuiDialogService<TuiDialogOptions<any>>’. Type ‘PolymorpheusComponent<TuiDialogComponent<unknown, unknown>, object>’ is not assignable to type ‘PolymorpheusContent<TuiDialog<TuiDialogOptions<any>, any>>’. Type ‘PolymorpheusComponent<TuiDialogComponent<unknown, unknown>, object>’ is not assignable to type ‘PolymorpheusComponent<object, TuiDialog<TuiDialogOptions<any>, any>>’. Types have separate declarations of a private property ‘injector’.
7 protected readonly component: PolymorpheusComponent<TuiDialogComponent<unknown, unknown>, object>;
Expected behavior
The library builds without error
Versions
- OS: Windows
- Browser [e.g. chrome, safari]
- Angular ~11.2.12
- Node: v14.15.4
- NPM: 6.14.10
Additional context
V2.8.0 builds without error.
Build error log
[error] Error: [96mnode_modules/@taiga-ui/core/components/dialog/dialog.service.d.ts[0m:[93m7[0m:[93m24[0m - [91merror[0m[90m TS2416: [0mProperty 'component' in type 'TuiDialogService' is not assignable to the same property in base type 'AbstractTuiDialogService<TuiDialogOptions<any>>'.
Type 'PolymorpheusComponent<TuiDialogComponent<unknown, unknown>, object>' is not assignable to type 'PolymorpheusContent<TuiDialog<TuiDialogOptions<any>, any>>'.
Type 'PolymorpheusComponent<TuiDialogComponent<unknown, unknown>, object>' is not assignable to type 'PolymorpheusComponent<object, TuiDialog<TuiDialogOptions<any>, any>>'.
Types have separate declarations of a private property 'injector'.
[7m7[0m protected readonly component: PolymorpheusComponent<TuiDialogComponent<unknown, unknown>, object>;
[7m [0m [91m ~~~~~~~~~[0m
at Object.compileSourceFiles (C:\easilog\web-app-rewrite\easilog\node_modules\ng-packagr\lib\ngc\compile-source-files.js:61:15)
at async C:\easilog\web-app-rewrite\easilog\node_modules\ng-packagr\lib\ng-package\entry-point\compile-ngc.transform.js:35:13
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (9 by maintainers)
Top GitHub Comments
It’s not necessarily incorrect, it’s superfluous. If hint template had a button that should be triggering change detection on the parent component (say it changed some value on click) — then directive would be necessary. This is exactly why it was created — to sync change detection. But here it’s not needed and we should probably remove it from the demo (and in most cases where it’s used on the demo), thank you for spotting it!
Thanks. removing it, simplifies it 👍