rintoj / ngx-virtual-scroller

Virtual Scroll displays a virtual, "infinite" list.
https://rintoj.github.io/ngx-virtual-scroller
MIT License
977 stars 294 forks source link

Cannot find name 'globalThis'. #446

Open AshMcConnell opened 4 years ago

AshMcConnell commented 4 years ago

Hi Folks,

I've just upgraded to 4.0.3, but I get the following errors in the virtual-scroller.d.ts file: -

ERROR in node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(58,29): error TS2304: Cannot find name 'globalThis'. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(59,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(62,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(77,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(78,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(82,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(83,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(85,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(86,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(91,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(92,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(94,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(95,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(98,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(99,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(106,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ngx-virtual-scroller/virtual-scroller.d.ts(107,9): error TS1086: An accessor cannot be declared in an ambient context.

Is there a way to get it to compile (I'm using angular 7)?

Thanks!

rohangupta231 commented 4 years ago

Hi, for angular 7 you need to use version 3.0.3 as the version 4.0.3 requires angular 9 version of your project