@@ -5,66 +5,51 @@ Index: es2015.reflect.d.ts
5
5
===================================================================
6
6
--- es2015.reflect.d.ts
7
7
+++ es2015.reflect.d.ts
8
- @@ -1,143 +1,14 @@
9
- declare namespace Reflect {
10
- /**
11
- - * Calls the function with the specified object as the this value
12
- - * and the elements of specified array as the arguments.
13
- - * @param target The function to call.
14
- - * @param thisArgument The object to be used as the this object.
15
- - * @param argumentsList An array of argument values to be passed to the function.
16
- - */
17
- - function apply<T, A extends readonly any[], R>(
18
- - target: (this: T, ...args: A) => R,
19
- - thisArgument: T,
20
- - argumentsList: Readonly<A>
21
- - ): R;
8
+ @@ -10,14 +10,8 @@
9
+ target: (this: T, ...args: A) => R,
10
+ thisArgument: T,
11
+ argumentsList: Readonly<A>
12
+ ): R;
22
13
- function apply(
23
14
- target: Function,
24
15
- thisArgument: any,
25
16
- argumentsList: ArrayLike<any>
26
17
- ): any;
27
18
-
28
- - /**
29
- - * Constructs the target with the elements of specified array as the arguments
30
- - * and the specified constructor as the `new.target` value.
31
- - * @param target The constructor to invoke.
32
- - * @param argumentsList An array of argument values to be passed to the constructor.
33
- - * @param newTarget The constructor to be used as the `new.target` object.
34
- - */
35
- - function construct<A extends readonly any[], R>(
36
- - target: new (...args: A) => R,
37
- - argumentsList: Readonly<A>,
38
- - newTarget?: new (...args: any) => any
39
- - ): R;
19
+ /**
20
+ * Constructs the target with the elements of specified array as the arguments
21
+ * and the specified constructor as the `new.target` value.
22
+ * @param target The constructor to invoke.
23
+ @@ -28,14 +22,8 @@
24
+ target: new (...args: A) => R,
25
+ argumentsList: Readonly<A>,
26
+ newTarget?: new (...args: any) => any
27
+ ): R;
40
28
- function construct(
41
29
- target: Function,
42
30
- argumentsList: ArrayLike<any>,
43
31
- newTarget?: Function
44
32
- ): any;
45
33
-
46
- - /**
47
- - * Adds a property to an object, or modifies attributes of an existing property.
48
- - * @param target Object on which to add or modify the property. This can be a native JavaScript object
49
- - * (that is, a user-defined object or a built in object) or a DOM object.
50
- - * @param propertyKey The property name.
51
- - * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
52
- - */
53
- - function defineProperty(
54
- - target: object,
55
- - propertyKey: PropertyKey,
56
- - attributes: PropertyDescriptor & ThisType<any>
57
- - ): boolean;
34
+ /**
35
+ * Adds a property to an object, or modifies attributes of an existing property.
36
+ * @param target Object on which to add or modify the property. This can be a native JavaScript object
37
+ * (that is, a user-defined object or a built in object) or a DOM object.
38
+ @@ -46,30 +34,27 @@
39
+ target: object,
40
+ propertyKey: PropertyKey,
41
+ attributes: PropertyDescriptor & ThisType<any>
42
+ ): boolean;
58
43
-
59
- - /**
60
- - * Removes a property from an object, equivalent to `delete target[propertyKey]`,
61
- - * except it won't throw if `target[propertyKey]` is non-configurable.
62
- - * @param target Object from which to remove the own property.
63
- - * @param propertyKey The property name.
64
- - */
65
- - function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
44
+ /**
45
+ * Removes a property from an object, equivalent to `delete target[propertyKey]`,
46
+ * except it won't throw if `target[propertyKey]` is non-configurable.
47
+ * @param target Object from which to remove the own property.
48
+ * @param propertyKey The property name.
49
+ */
50
+ function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
66
51
-
67
- - /**
52
+ /**
68
53
* Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`.
69
54
* @param target Object that contains the property on itself or in its prototype chain.
70
55
* @param propertyKey The property name.
@@ -78,78 +63,63 @@ Index: es2015.reflect.d.ts
78
63
receiver?: unknown
79
64
- ): P extends keyof T ? T[P] : any;
80
65
-
81
- - /**
82
- - * Gets the own property descriptor of the specified object.
83
- - * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype .
84
- - * @param target Object that contains the property .
85
- - * @param propertyKey The property name .
86
- - */
87
- - function getOwnPropertyDescriptor<T extends object, P extends PropertyKey>(
88
- - target: T,
89
- - propertyKey: P
90
- - ): TypedPropertyDescriptor<P extends keyof T ? T[P] : any> | undefined;
66
+ + ): P extends keyof T ? T[P] : unknown;
67
+ /**
68
+ * Gets the own property descriptor of the specified object.
69
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype .
70
+ * @param target Object that contains the property .
71
+ @@ -78,42 +63,36 @@
72
+ function getOwnPropertyDescriptor<T extends object, P extends PropertyKey>(
73
+ target: T,
74
+ propertyKey: P
75
+ ): TypedPropertyDescriptor<P extends keyof T ? T[P] : any> | undefined;
91
76
-
92
- - /**
93
- - * Returns the prototype of an object.
94
- - * @param target The object that references the prototype.
95
- - */
96
- - function getPrototypeOf(target: object): object | null;
77
+ /**
78
+ * Returns the prototype of an object.
79
+ * @param target The object that references the prototype.
80
+ */
81
+ function getPrototypeOf(target: object): object | null;
97
82
-
98
- - /**
99
- - * Equivalent to `propertyKey in target`.
100
- - * @param target Object that contains the property on itself or in its prototype chain.
101
- - * @param propertyKey Name of the property.
102
- - */
103
- - function has(target: object, propertyKey: PropertyKey): boolean;
83
+ /**
84
+ * Equivalent to `propertyKey in target`.
85
+ * @param target Object that contains the property on itself or in its prototype chain.
86
+ * @param propertyKey Name of the property.
87
+ */
88
+ function has(target: object, propertyKey: PropertyKey): boolean;
104
89
-
105
- - /**
106
- - * Returns a value that indicates whether new properties can be added to an object.
107
- - * @param target Object to test.
108
- - */
109
- - function isExtensible(target: object): boolean;
90
+ /**
91
+ * Returns a value that indicates whether new properties can be added to an object.
92
+ * @param target Object to test.
93
+ */
94
+ function isExtensible(target: object): boolean;
110
95
-
111
- - /**
112
- - * Returns the string and symbol keys of the own properties of an object. The own properties of an object
113
- - * are those that are defined directly on that object, and are not inherited from the object's prototype.
114
- - * @param target Object that contains the own properties.
115
- - */
116
- - function ownKeys(target: object): (string | symbol)[];
96
+ /**
97
+ * Returns the string and symbol keys of the own properties of an object. The own properties of an object
98
+ * are those that are defined directly on that object, and are not inherited from the object's prototype.
99
+ * @param target Object that contains the own properties.
100
+ */
101
+ function ownKeys(target: object): (string | symbol)[];
117
102
-
118
- - /**
119
- - * Prevents the addition of new properties to an object.
120
- - * @param target Object to make non-extensible.
121
- - * @return Whether the object has been made non-extensible.
122
- - */
123
- - function preventExtensions(target: object): boolean;
103
+ /**
104
+ * Prevents the addition of new properties to an object.
105
+ * @param target Object to make non-extensible.
106
+ * @return Whether the object has been made non-extensible.
107
+ */
108
+ function preventExtensions(target: object): boolean;
124
109
-
125
- - /**
126
- - * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`.
127
- - * @param target Object that contains the property on itself or in its prototype chain.
128
- - * @param propertyKey Name of the property.
129
- - * @param receiver The reference to use as the `this` value in the setter function,
130
- - * if `target[propertyKey]` is an accessor property.
131
- - */
132
- - function set<T extends object, P extends PropertyKey>(
133
- - target: T,
134
- - propertyKey: P,
135
- - value: P extends keyof T ? T[P] : any,
136
- - receiver?: any
137
- - ): boolean;
138
- - function set(
139
- - target: object,
140
- - propertyKey: PropertyKey,
141
- - value: any,
142
- - receiver?: any
143
- - ): boolean;
110
+ /**
111
+ * Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`.
112
+ * @param target Object that contains the property on itself or in its prototype chain.
113
+ * @param propertyKey Name of the property.
114
+ @@ -131,9 +110,8 @@
115
+ propertyKey: PropertyKey,
116
+ value: any,
117
+ receiver?: any
118
+ ): boolean;
144
119
-
145
- - /**
146
- - * Sets the prototype of a specified object o to object proto or null.
147
- - * @param target The object to change its prototype.
148
- - * @param proto The value of the new prototype or null.
149
- - * @return Whether setting the prototype was successful.
150
- - */
151
- - function setPrototypeOf(target: object, proto: object | null): boolean;
152
- + ): P extends keyof T ? T[P] : unknown;
153
- }
120
+ /**
121
+ * Sets the prototype of a specified object o to object proto or null.
122
+ * @param target The object to change its prototype.
123
+ * @param proto The value of the new prototype or null.
154
124
155
125
```
0 commit comments