CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)

Home Page:https://angular2-tree.readme.io/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular 11 application build error

neversayadmin opened this issue · comments

Building an application with angular 11 and angular-tree-component in its dependencies gives the following error:

Error: 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>'.

21 export declare class ObservableSet<T = any> implements Set<T>, IInterceptable<ISetWillChange>, IListenable {
                        ~~~~~~~~~~~~~

  node_modules/@types/core-js/index.d.ts:78:5
    78     toJSON(): any;
           ~~~~~~~~~~~~~~
    'toJSON' is declared here.

Expected behavior:

The library builds without errors.

Versions of Angular Tree Component, Angular, Node, affected browser(s) and operating system(s):

"dependencies": {
"@circlon/angular-tree-component": "^11.0.4"
"@angular/core": "~11.2.12",
"typescript": "~4.1.5",
"@types/core-js": "^2.5.4",
...
}

A quick workaround is to add skipLibCheck: true to compilerOptions inside your app's tsconfig.json