UNPKG

795 BTypeScriptView Raw
1import polyfill = require("./implementation");
2import getImpl = require("./polyfill");
3import shimImpl = require("./shim");
4
5/**
6 * Returns an object containing all own property descriptors of an object
7 * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
8 */
9declare function getOwnPropertyDescriptors<T>(
10 o: T,
11):
12 & {
13 -readonly [P in keyof T]: TypedPropertyDescriptor<T[P]>;
14 }
15 & {
16 [property: string]: PropertyDescriptor;
17 };
18
19declare namespace getOwnPropertyDescriptors {
20 function getPolyfill(): ReturnType<typeof getImpl>;
21 const implementation: typeof polyfill;
22 function shim(): ReturnType<typeof shimImpl>;
23}
24
25export = getOwnPropertyDescriptors;