Search code examples
angularnpmangular-materialinfinite-scrollngx-bootstrap

error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments


I installed ngx-infinite-scroll library using npm install ngx-infinite-scroll --save command. As provided in the docs.
However, I am getting the following error in the library file:
Error: node_modules/ngx-infinite-scroll/lib/ngx-infinite-scroll.directive.d.ts:28:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments

Screenshot : enter image description here

Some already existing solutions:

  • Found a similar error message question asked on stackflow itself : Here . But its in different library.

  • One more identical one : Here. But as per the library I added, recommended solution is not helpful as I already have it for the lib.

Info about version that I have:
enter image description here

I read few more article but didnt found a concrete solution.


Solution

  • I was using latest version of the ngx-infinite-scroll which is 15.0.0, but my Angular version is 14.

    So I downgraded ngx-infinite-scroll version to 14 using npm install [email protected]
    And error got resolved.

    ScreenShot: enter image description here