OrgChart Editor with Angular code errors

Hi Everyone ,

I’ve integrated OrgChart editor with angular but I’ve got many errors , not Typescript errors but
it’s about some properties and Types I don’t know what to do in this case any help please ?

Ps : the project runs correctly but these errors ruined my console .

src/app/app.component.ts(112,16): error TS2339: Property ‘text’ does not exist on type ‘GraphObject’.
src/app/app.component.ts(121,20): error TS2339: Property ‘commitNodes’ does not exist on type ‘Layout’.
src/app/app.component.ts(122,29): error TS2445: Property ‘commitNodes’ is protected and only accessible within class ‘TreeLayout’ and its subclasses.
src/app/app.component.ts(127,23): error TS2339: Property ‘level’ does not exist on type ‘LayoutVertex’.
src/app/app.component.ts(130,26): error TS2339: Property ‘fill’ does not exist on type ‘GraphObject’.
src/app/app.component.ts(276,3): error TS2322: Type ‘GraphObject’ is not assignable to type ‘Adornment | HTMLInfo’.
Type ‘GraphObject’ is missing the following properties from type ‘Adornment’: placeholder, adornedObject, adornedPart, updateTargetBindings, and 130 more.
src/app/app.component.ts(282,33): error TS2339: Property ‘adornedPart’ does not exist on type ‘Part’.
src/app/app.component.ts(299,33): error TS2339: Property ‘adornedPart’ does not exist on type ‘Part’.
src/app/app.component.ts(306,33): error TS2551: Property ‘setParentKeyForNodeData’ does not exist on type ‘Model’. Did you mean ‘setCategoryForNodeData’?
src/app/app.component.ts(320,33): error TS2339: Property ‘adornedPart’ does not exist on type ‘Part’.
src/app/app.component.ts(323,15): error TS2554: Expected 2 arguments, but got 1.
src/app/app.component.ts(342,25): error TS2304: Cannot find name ‘myInspector’.
src/app/app.component.ts(342,43): error TS2304: Cannot find name ‘Inspector’.

Those are TypeScript errors. It appears that TypeScript is not finding the go.d.ts file. I don’t know why that is a problem in your project but not in everyone else’s. But if you want to avoid those error messages, that is what you need to fix.

Oh, what version of GoJS and what version of TypeScript are you using? GoJS 2.0 requires TypeScript 2.8.

I’m using typescript 3.1.2
I’ve imported go.d.ts too and the errors didn’t disepear

PS : whene I transform the same node modules and the same configuration to OrgChart static everything goes right

I have read that each version of Angular uses a specific version of TypeScript. It might be easiest to downgrade GoJS to 1.8.*.

4 posts were split to a new topic: Do you have a sample using a recent version of React?