@types/object.getownpropertydescriptors
Version:
TypeScript definitions for object.getownpropertydescriptors
26 lines (22 loc) • 795 B
TypeScript
import polyfill = require("./implementation");
import getImpl = require("./polyfill");
import shimImpl = require("./shim");
/**
* Returns an object containing all own property descriptors of an object
* @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.
*/
declare function getOwnPropertyDescriptors<T>(
o: T,
):
& {
-readonly [P in keyof T]: TypedPropertyDescriptor<T[P]>;
}
& {
[property: string]: PropertyDescriptor;
};
declare namespace getOwnPropertyDescriptors {
function getPolyfill(): ReturnType<typeof getImpl>;
const implementation: typeof polyfill;
function shim(): ReturnType<typeof shimImpl>;
}
export = getOwnPropertyDescriptors;