diprokon / ng-table-virtual-scroll

Virtual Scroll for Angular Material Table
https://diprokon.github.io/ng-table-virtual-scroll
MIT License
134 stars 42 forks source link

get and set declared in typescript interface dataLength property #41

Closed azulay7 closed 3 years ago

azulay7 commented 3 years ago

ERROR in node_modules/ng-table-virtual-scroll/lib/fixed-size-table-virtual-scroll-strategy.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-table-virtual-scroll/lib/fixed-size-table-virtual-scroll-strategy.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context.

Failed in runtime. "@angular/cli": "~7.1.4", "typescript": "^3.1.6",

I tried to update to tsc 3.8.3 but my angular cli return an error ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.8.3 was found instead.

I can't upgrade at this moment.

hakimio commented 3 years ago

That seems to be more of a problem on your end because of incompatible TS version than a bug in this project.

vvarelasalichs commented 3 years ago

ERROR in node_modules/ng-table-virtual-scroll/lib/fixed-size-table-virtual-scroll-strategy.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context. node_modules/ng-table-virtual-scroll/lib/fixed-size-table-virtual-scroll-strategy.d.ts(21,9): error TS1086: An accessor cannot be declared in an ambient context.

Failed in runtime. "@angular/cli": "~7.1.4", "typescript": "^3.1.6",

I tried to update to tsc 3.8.3 but my angular cli return an error ERROR in The Angular Compiler requires TypeScript >=3.1.1 and <3.2.0 but 3.8.3 was found instead.

I can't upgrade at this moment.

I had same problem (with angular 7) and I just install "ng-table-virtual-scroll" version "1.3.1" instead of last version. With this, it works for me.

diprokon commented 3 years ago

As I understand, the problem is in your versions. You need to update angular version, or use "skipLibCheck": true in tsconfig.json "compilerOptions" (link)

azulay7 commented 3 years ago

@diprokon you nailed it. Thanks!