I import go-debug in my file gojs.ts, which importing throughout project (I use DI).
import * as go from 'gojs/release/go-debug';
then I import in the same file
import { ReactDiagram } from 'gojs-react';
and then I get error in index file at render ReactDiagram
<>
<ReactDiagram
initDiagram={initDiagram}
divClassName="diagram-component"
nodeDataArray={[...examples, ...normalizeSchema]}
onModelChange={handleModelChange}
linkDataArray={linkDataArray}
skipsDiagramUpdate
/>
</>
Error:
TS2769: No overload matches this call.
Overload 1 of 2, '(props: DiagramProps | Readonly<DiagramProps>): ReactDiagram', gave the following error.
Type '() => go.Diagram' is not assignable to type '() => import("C:/Users/user/Documents/projects/bot-ui/node_modules/gojs/release/go").Diagram'.
Type 'go.Diagram' is not assignable to type 'import("C:/Users/user/Documents/projects/bot-ui/node_modules/gojs/release/go").Diagram'.
Property 'computeBounds' is protected but type 'Diagram' is not a class derived from 'Diagram'.
Overload 2 of 2, '(props: DiagramProps, context: any): ReactDiagram', gave the following error.
Type '() => go.Diagram' is not assignable to type '() => import("C:/Users/user/Documents/projects/bot-ui/node_modules/gojs/release/go").Diagram'.
How to use go-debug jointly with gojs-react is absent in the tutorial. I don’t understand how to import right.