Skip to content

Function: findWhereUsed()

findWhereUsed<TRow>(rows, nodeId, getRowId, getParentId): WhereUsedResult<TRow>[]

Defined in: src/data/where-used.ts:13

Finds all parent assemblies that directly contain a given node. Traverses the in-memory tree to build paths from root to each usage.

Type Parameters

TRow

TRow

Parameters

rows

TRow[]

All rows in the tree

nodeId

string

The node to find usages of

getRowId

(row) => string

Function to extract row id

getParentId

(row) => string | null | undefined

Function to extract parent id

Returns

WhereUsedResult<TRow>[]

Array of where-used results with parent and path