Dagre uses Graphlib, and has a copy of Graphlib's type definitions. If you compare Graphlib's type definitions with Dagre's copy, you can see that they are very different.
As far as I can tell the Dagre copy is completely wrong (or out of date). For example:
node(id: string | Label): Node<T>;
You can't look up a node by its label (which is an arbitrary Record<string, unknown>). Graphlib's types have this correct:
(well, ignoring the fact that it returns any rather than Record<string, unknown>)
@types/xxxxpackage and had problems.Definitions by:inindex.d.ts) so they can respond.Dagre uses Graphlib, and has a copy of Graphlib's type definitions. If you compare Graphlib's type definitions with Dagre's copy, you can see that they are very different.
As far as I can tell the Dagre copy is completely wrong (or out of date). For example:
You can't look up a node by its label (which is an arbitrary
Record<string, unknown>). Graphlib's types have this correct:(well, ignoring the fact that it returns
anyrather thanRecord<string, unknown>)