We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
getEdgeProperties
undefined
1 parent d9785de commit b071242Copy full SHA for b071242
src/Graph.ts
@@ -106,10 +106,10 @@ export class Graph<Node = string, LinkProps = never> {
106
}
107
108
/**
109
- * Get the properties of the given edge or undefined if none are set.
+ * Get the properties of the given edge or undefined if the edge doesn't exist .
110
*/
111
- getEdgeProperties(source: Node, target: Node): LinkProps {
112
- return this.edgeProperties.get(source)?.get(target) as LinkProps;
+ getEdgeProperties(source: Node, target: Node): LinkProps | undefined {
+ return this.edgeProperties.get(source)?.get(target);
113
114
115
0 commit comments