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: 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>;
                         ~~~~~~~~~

    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)

Most upvoted 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!