CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.1k stars 492 forks source link

node_modules/@circlon/angular-tree-component/node_modules/mobx/lib/types/observableset.d.ts:21:22 - error TS2420: Class 'ObservableSet<T>' incorrectly implements interface 'Set<T>'. Property 'toJSON' is missing in type 'ObservableSet<T>' but required in type 'Set<T>'. #882

Closed somuda86 closed 3 years ago

somuda86 commented 3 years ago

Building with angular 10 not working node_modules/@circlon/angular-tree-component/node_modules/mobx/lib/types/observableset.d.ts:21:22 - error TS2420: Class 'ObservableSet' incorrectly implements interface 'Set'. Property 'toJSON' is missing in type 'ObservableSet' but required in type 'Set'. 21 export declare class ObservableSet<T = any> implements Set, IInterceptable, IListenable {


  node_modules/@types/core-js/index.d.ts:78:5
    78     toJSON(): any;
'toJSON' is declared here.
somuda86 commented 3 years ago

@tobiasengelhardt is this a valid issue? Just curious here

tobiasengelhardt commented 3 years ago

Which version of the tree are you using?

iamoku commented 3 years ago

I have the same issue building with angular 11, I have implemented the to JSON() in that observableset just to let it compile but I don't think is the correct way to solve the issue.

Adam-Michalski commented 3 years ago

tsconfig.json

{
  "compileOnSave": false,
  "compilerOptions": {
    "skipLibCheck": true, --< add this line 

Another one it was required for me was

"allowSyntheticDefaultImports": true,

Angular 9

somuda86 commented 3 years ago

Thanks @Adam-Michalski

konstantinkrassmann commented 3 years ago

Same problem here with angular 11. "skipLibCheck": true, fixed it.