force-graph
force-graph copied to clipboard
Type alias 'ForceGraphInstance' circularly references itself.
When trying to compile using the sample example: ERROR in node_modules/force-graph/src/index.d.ts:171:13 - error TS2456: Type alias 'ForceGraphInstance' circularly references itself. export type ForceGraphInstance = ForceGraphGenericInstance<ForceGraphInstance>;
@yan90wang make sure to upgrade to a recent version of TypeScript.
This issue was solved in TS version 3.7.0: https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/
Just a note, TS 3.7.0 has some breaking changes that makes it not possible to upgrade to the latest and greatest react-graph unfortunately. At least in my case with the project I am working on.
Can we have any different solution for 3.4 typescript version? Please let me know asap , I could not able to upgrade type script version to 3.7 at this moment.
if you use angular 8, the compiler forbids using typescript > 3.6.0
any updates on it? Im on angular 8, and the project is cant be built, I also can't upgrade to a newer angular. Is there a workaround?