UNPKG

571 BTypeScriptView Raw
1/**
2 * Gets the own property descriptor of the specified object.
3 * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
4 *
5 * @param target Object that contains the property.
6 * @param propertyKey Name of the property.
7 */
8declare const getOwnPropertyDescriptor:
9 | (
10 <T, P extends PropertyKey>(target: T, propertyKey: P) =>
11 | (P extends keyof T ? TypedPropertyDescriptor<T[P]> : PropertyDescriptor)
12 | undefined
13 )
14 | null;
15export = getOwnPropertyDescriptor;