@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
| Parameter | Type | Description |
|---|---|---|
proto | object | The prototype to start searching from |
key | string | The property name to look for |
stopAt | object | The prototype to stop at (exclusive) |
Returns
PropertyDescriptor | undefined
The property descriptor if found, or undefined