File tree 12 files changed +22803
-7622
lines changed
12 files changed +22803
-7622
lines changed Original file line number Diff line number Diff line change @@ -179,19 +179,19 @@ interface ObjectConstructor {
179
179
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
180
180
* @param o Object on which to lock the attributes.
181
181
*/
182
- seal ( o : any ) : any ;
182
+ seal < T > ( o : T ) : T ;
183
183
184
184
/**
185
185
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
186
186
* @param o Object on which to lock the attributes.
187
187
*/
188
- freeze ( o : any ) : any ;
188
+ freeze < T > ( o : T ) : T ;
189
189
190
190
/**
191
191
* Prevents the addition of new properties to an object.
192
192
* @param o Object to make non-extensible.
193
193
*/
194
- preventExtensions ( o : any ) : any ;
194
+ preventExtensions < T > ( o : T ) : T ;
195
195
196
196
/**
197
197
* Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
@@ -425,6 +425,9 @@ interface String {
425
425
*/
426
426
substr ( from : number , length ?: number ) : string ;
427
427
428
+ /** Returns the primitive value of the specified object. */
429
+ valueOf ( ) : string ;
430
+
428
431
[ index : number ] : string ;
429
432
}
430
433
@@ -477,6 +480,9 @@ interface Number {
477
480
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
478
481
*/
479
482
toPrecision ( precision ?: number ) : string ;
483
+
484
+ /** Returns the primitive value of the specified object. */
485
+ valueOf ( ) : number ;
480
486
}
481
487
482
488
interface NumberConstructor {
Original file line number Diff line number Diff line change @@ -179,19 +179,19 @@ interface ObjectConstructor {
179
179
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
180
180
* @param o Object on which to lock the attributes.
181
181
*/
182
- seal ( o : any ) : any ;
182
+ seal < T > ( o : T ) : T ;
183
183
184
184
/**
185
185
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
186
186
* @param o Object on which to lock the attributes.
187
187
*/
188
- freeze ( o : any ) : any ;
188
+ freeze < T > ( o : T ) : T ;
189
189
190
190
/**
191
191
* Prevents the addition of new properties to an object.
192
192
* @param o Object to make non-extensible.
193
193
*/
194
- preventExtensions ( o : any ) : any ;
194
+ preventExtensions < T > ( o : T ) : T ;
195
195
196
196
/**
197
197
* Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
@@ -425,6 +425,9 @@ interface String {
425
425
*/
426
426
substr ( from : number , length ?: number ) : string ;
427
427
428
+ /** Returns the primitive value of the specified object. */
429
+ valueOf ( ) : string ;
430
+
428
431
[ index : number ] : string ;
429
432
}
430
433
@@ -477,6 +480,9 @@ interface Number {
477
480
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
478
481
*/
479
482
toPrecision ( precision ?: number ) : string ;
483
+
484
+ /** Returns the primitive value of the specified object. */
485
+ valueOf ( ) : number ;
480
486
}
481
487
482
488
interface NumberConstructor {
Original file line number Diff line number Diff line change @@ -179,19 +179,19 @@ interface ObjectConstructor {
179
179
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
180
180
* @param o Object on which to lock the attributes.
181
181
*/
182
- seal(o: any ): any ;
182
+ seal<T> (o: T ): T ;
183
183
184
184
/**
185
185
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
186
186
* @param o Object on which to lock the attributes.
187
187
*/
188
- freeze(o: any ): any ;
188
+ freeze<T> (o: T ): T ;
189
189
190
190
/**
191
191
* Prevents the addition of new properties to an object.
192
192
* @param o Object to make non-extensible.
193
193
*/
194
- preventExtensions(o: any ): any ;
194
+ preventExtensions<T> (o: T ): T ;
195
195
196
196
/**
197
197
* Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
@@ -425,6 +425,9 @@ interface String {
425
425
*/
426
426
substr(from: number, length?: number): string;
427
427
428
+ /** Returns the primitive value of the specified object. */
429
+ valueOf(): string;
430
+
428
431
[index: number]: string;
429
432
}
430
433
@@ -477,6 +480,9 @@ interface Number {
477
480
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
478
481
*/
479
482
toPrecision(precision?: number): string;
483
+
484
+ /** Returns the primitive value of the specified object. */
485
+ valueOf(): number;
480
486
}
481
487
482
488
interface NumberConstructor {
Original file line number Diff line number Diff line change @@ -179,19 +179,19 @@ interface ObjectConstructor {
179
179
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
180
180
* @param o Object on which to lock the attributes.
181
181
*/
182
- seal(o: any ): any ;
182
+ seal<T> (o: T ): T ;
183
183
184
184
/**
185
185
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
186
186
* @param o Object on which to lock the attributes.
187
187
*/
188
- freeze(o: any ): any ;
188
+ freeze<T> (o: T ): T ;
189
189
190
190
/**
191
191
* Prevents the addition of new properties to an object.
192
192
* @param o Object to make non-extensible.
193
193
*/
194
- preventExtensions(o: any ): any ;
194
+ preventExtensions<T> (o: T ): T ;
195
195
196
196
/**
197
197
* Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
@@ -425,6 +425,9 @@ interface String {
425
425
*/
426
426
substr(from: number, length?: number): string;
427
427
428
+ /** Returns the primitive value of the specified object. */
429
+ valueOf(): string;
430
+
428
431
[index: number]: string;
429
432
}
430
433
@@ -477,6 +480,9 @@ interface Number {
477
480
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
478
481
*/
479
482
toPrecision(precision?: number): string;
483
+
484
+ /** Returns the primitive value of the specified object. */
485
+ valueOf(): number;
480
486
}
481
487
482
488
interface NumberConstructor {
You can’t perform that action at this time.
0 commit comments