Skip to content

Commit 7561cdf

Browse files
committed
Add ThisType<any> to Object.{create|defineProperty|defineProperties}
1 parent 9d1b325 commit 7561cdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/es5.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,22 @@ interface ObjectConstructor {
147147
* @param o Object to use as a prototype. May be null
148148
* @param properties JavaScript object that contains one or more property descriptors.
149149
*/
150-
create(o: object | null, properties: PropertyDescriptorMap): any;
150+
create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
151151

152152
/**
153153
* Adds a property to an object, or modifies attributes of an existing property.
154154
* @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
155155
* @param p The property name.
156156
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
157157
*/
158-
defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
158+
defineProperty(o: any, p: string, attributes: PropertyDescriptor & ThisType<any>): any;
159159

160160
/**
161161
* Adds one or more properties to an object, and/or modifies attributes of existing properties.
162162
* @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
163163
* @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
164164
*/
165-
defineProperties(o: any, properties: PropertyDescriptorMap): any;
165+
defineProperties(o: any, properties: PropertyDescriptorMap & ThisType<any>): any;
166166

167167
/**
168168
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.

0 commit comments

Comments
 (0)