Skip to Content
Vue Flow v2 is here and joins xyflow! Read more here →

isEdge()

Source on GitHub 

The isEdge util is a type guard that returns true when a flow element is an Edge, narrowing its type for TypeScript.

import { isEdge } from '@xyflow/vue'; const edgesOnly = elements.filter(isEdge);

Signature

Parameters:
NameTypeDefault
elementunknown

The element to test.

Returns:
boolean

true if the value can be used as an Edge.

Notes

  • See isNode for the node counterpart.