File: index.d.ts

package info (click to toggle)
node-define-properties 1.1.4%2B~1.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 160 kB
  • sloc: javascript: 172; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Type definitions for define-properties 1.1
// Project: https://github.com/ljharb/define-properties#readme
// Definitions by: ExE Boss <https://github.com/ExE-Boss>
//                 Jordan Harband <https://github.com/ljharb>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

declare namespace defineProperties {
    /**
     * Whether the current environment correctly supports property descriptors.
     */
    const supportsDescriptors: boolean;
}

/**
 * Defines new properties in `map` as non-enumerable if they don't already
 * exist on `object`.
 *
 * @param object The object to define non-enumerable properties on.
 * @param map The map of newly defined properties.
 * @param predicates The optional predicates map, return `true` to override existing properties on `object`.
 */
declare function defineProperties<M extends object>(
    object: object,
    map: M & ThisType<any>,
    predicates?: Partial<Record<keyof M, () => boolean>>,
): void;
export = defineProperties;