l-lin / angular-datatables

DataTables with Angular
https://l-lin.github.io/angular-datatables/
MIT License
1.57k stars 486 forks source link

Angular 11: Type 'import(".../Subject").Subject<any>' is not assignable to type 'import(".../Subject").Subject<any>' #1550

Closed shivajim closed 3 years ago

shivajim commented 3 years ago

Hi Team, I want to rerendering datatables so I am declaring dtTrigger as dtTrigger: Subject<any> = new Subject(); and using in template as [dtTrigger]="dtTrigger" but gives me an error in compilation.

:8ball: Code should compile with no type of error


Error: src/app/shared/components/datatables/datatables.component.html:3:47 - error TS2322: Type 'import("/home/shivaji/eaf/environment/development/develop/web/apps/broker-portal/ui/node_modules/rxjs/internal/Subject").Subject' is not assignable to type 'import("/home/shivaji/eaf/environment/development/develop/web/apps/broker-portal/ui/node_modules/angular-datatables/node_modules/rxjs/internal/Subject").Subject'.
  Types of property 'lift' are incompatible.
    Type '(operator: import("/home/shivaji/eaf/environment/development/develop/web/apps/broker-portal/ui/node_modules/rxjs/internal/Operator").Operator) => import("/home/shivaji/eaf/environment/development/develop/web/apps/broker-portal/ui/node_modules/rxjs/internal/Observable").Observable' is not assignable to type '(operator: import("/home/shivaji/eaf/environment/development/develop/web/apps/broker-portal/ui/node_modules/angular-datatables/node_modules/rxjs/internal/Operator").Operator) => import("/home/shivaji/eaf/environment/development/develop/web/apps/broker-portal/ui/node_modules/angular-datatables/node_modules...'.
      Types of parameters 'operator' and 'operator' are incompatible.
        Type 'import("/home/shivaji/eaf/environment/development/develop/web/apps/broker-portal/ui/node_modules/angular-datatables/node_modules/rxjs/internal/Operator").Operator' is not assignable to type 'import("/home/shivaji/eaf/environment/development/develop/web/apps/broker-portal/ui/node_modules/rxjs/internal/Operator").Operator'.
          Types of property 'call' are incompatible.

A clear and concise description of what you expected to happen.

:camera: Screenshots

:globe_with_meridians: Ubuntu 18.04

shivajim commented 3 years ago

Solved this issue after upgrading the version to 11.2.0.

apologize for this unnecessary bug.