maxGraph / maxGraph

maxGraph is a fully client side JavaScript diagramming library
https://maxgraph.github.io/maxGraph/
Apache License 2.0
799 stars 170 forks source link

Angular 14 maxGraph types (*.d.ts) errors #105

Closed Anthony-Wratpor closed 2 years ago

Anthony-Wratpor commented 2 years ago

Hello everyone,

i'm trying to use this library whit a new bare angular project.

I tried to clone the maxGraph repository and made the npm link to it in the angular project. So far so good.

But when i'm trying to build the app i have a bunch of errors in the types descriptions (*.d.ts).

To name a few i got :

"Error: ../maxGraph/packages/core/dist/types/gui/MaxPopupMenu.d.ts:29:15 - error TS2420: Class 'MaxPopupMenu' incorrectly implements interface 'Partial'", "Error: ../maxGraph/packages/core/dist/types/view/cell/CellArray.d.ts:4:5 - error TS2416: Property 'concat' in type 'CellArray' is not assignable to the same property in base type 'Cell[]'", "Error: ../maxGraph/packages/core/dist/types/view/layout/HierarchicalLayout.d.ts:197:5 - error TS2416: Property 'traverse' in type 'HierarchicalLayout' is not assignable to the same property in base type 'GraphLayout'."

I had similar issue with the old mxgraph back when i installed the mxGraph Types but I don't know what to do here. I'm sure i missed something or maybe it's not really compatible with angular yet?

If you have any idea of what coud be wrong here i would appreciate any help.

Thanks in advance

tbouffard commented 2 years ago

Hi you are facing #96. For now, as a workaround, set skipLibCheck to true in the tsconfig.json file of your project. See https://github.com/tbouffard/maxgraph-integration-examples to see projects using the development version of maxGraph.

Feel free to ask for more details