mobx-keystone
    Preparing search index...

    Function resolveId

    • Resolves a node given its ID.

      Type Parameters

      • T extends object

        Target object type.

      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 undefined | T

      The node found or undefined if none.