Open joelnz opened 3 years ago
@joelnz thanks for reaching out.
It's not clear why you're experiencing this issue. The extraRenderers
prop should be declared in the TS definitions for react-force-graph-3d
. Would you mind making a simplified example on codesandbox that reproduces this problem.
Also, can you confirm this is relative to the react-force-graph-3d
module? It's not clear from your message. That's the only module that has this prop.
Having the extraRenderers prop gives Typescript error.
`Failed to compile.
/Users/imac/Desktop/ui/src/DirectoryGrid.tsx TypeScript error in /Users/imac/Desktop/ui/src/DirectoryGrid.tsx(276,9): Type '{ width: number; height: number; enableNodeDrag: false; onNodeClick: (node: any) => void; extraRenderers: CSS2DRenderer[]; graphData: { nodes: any[]; links: any[]; }; backgroundColor: any; ... 10 more ...; nodeThreeObjectExtend: true; }' is not assignable to type 'IntrinsicAttributes & ForceGraphProps & { ref?: MutableRefObject<ForceGraphMethods | undefined> | undefined; } & { ...; }'. Property 'extraRenderers' does not exist on type 'IntrinsicAttributes & ForceGraphProps & { ref?: MutableRefObject<ForceGraphMethods | undefined> | undefined; } & { ...; }'. TS2322
A temporarily fixed it by ignoring typescript for this line
// @ts-ignore: Unreachable code error
extraRenderers={extraRenderers}