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:

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 ngx-infinite-scroll@14.0.1
    And error got resolved.

    ScreenShot: enter image description here