Skip to content

@half0wl/container / getPropertyDescriptorFromChain

Function: getPropertyDescriptorFromChain()

ts
function getPropertyDescriptorFromChain(
   proto, 
   key, 
   stopAt): PropertyDescriptor | undefined;

Defined in: helpers.ts:12

Walk the prototype chain from proto up to (but not including) stopAt, looking for a property descriptor with the given key.

Parameters

ParameterTypeDescription
protoobjectThe prototype to start searching from
keystringThe property name to look for
stopAtobjectThe prototype to stop at (exclusive)

Returns

PropertyDescriptor | undefined

The property descriptor if found, or undefined