Skip to main content

Function: getRoot()

function getRoot<T>(value): T;

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

Type Parameters​

Type ParameterDefault typeDescription
T extends objectanyRoot object type.

Parameters​

ParameterTypeDescription
valueobjectTarget object.

Returns​

T