Function getRoot

  • Returns the root of the target object, or itself if the target is a root.

    Type Parameters

    • T extends object = any

    Parameters

    • value: object

      Target object.

    Returns T

    Typeparam

    T Root object type.