taiga-ui: [BUG] Unable to build latest release (2.8.2)
đ 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
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 15 (2 by maintainers)
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!