Function: resolveId()
function resolveId<T>(
root,
id,
getId?
): T | undefined;
Resolves a node given its ID.
Type Parameters
| Type Parameter | Description |
|---|---|
T extends object | Target object type. |
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
root | object | undefined | Node where to start the search. The search will be done on it and all its children. |
id | string | undefined | ID to search for. |
getId | RefIdResolver | getModelRefId | Function that will be used to get the ID from an object (getModelRefId by default). |
Returns
T | undefined
The node found or undefined if none.