Function resolveId

  • Resolves a node given its ID.

    Type Parameters

    • T extends object

    Parameters

    • root: object

      Node where to start the search. The search will be done on it and all its children.

    • id: string

      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.

    Typeparam

    T Target object type.