Skip to main content

Function: getParent()

function getParent<T>(value): T | undefined;

Returns the parent object of the target object, or undefined if there's no parent.

Type Parameters​

Type ParameterDefault typeDescription
T extends objectanyParent object type.

Parameters​

ParameterTypeDescription
valueobjectTarget object.

Returns​

T | undefined