UNPKG

545 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 <T, P extends PropertyKey>(target: T, propertyKey: P) =>
10 | (P extends keyof T ? TypedPropertyDescriptor<T[P]> : PropertyDescriptor)
11 | undefined
12) | null;
13export = getOwnPropertyDescriptor;