UNPKG

707 BTypeScriptView Raw
1declare namespace defineProperties {
2 /**
3 * Whether the current environment correctly supports property descriptors.
4 */
5 const supportsDescriptors: boolean;
6}
7
8/**
9 * Defines new properties in `map` as non-enumerable if they don't already
10 * exist on `object`.
11 *
12 * @param object The object to define non-enumerable properties on.
13 * @param map The map of newly defined properties.
14 * @param predicates The optional predicates map, return `true` to override existing properties on `object`.
15 */
16declare function defineProperties<M extends object>(
17 object: object,
18 map: M & ThisType<any>,
19 predicates?: Partial<Record<keyof M, () => boolean>>,
20): void;
21export = defineProperties;