File tree Expand file tree Collapse file tree 12 files changed +22803
-7622
lines changed Expand file tree Collapse file tree 12 files changed +22803
-7622
lines changed Original file line number Diff line number Diff line change @@ -179,19 +179,19 @@ interface ObjectConstructor {
179179 * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
180180 * @param o Object on which to lock the attributes.
181181 */
182- seal ( o : any ) : any ;
182+ seal < T > ( o : T ) : T ;
183183
184184 /**
185185 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
186186 * @param o Object on which to lock the attributes.
187187 */
188- freeze ( o : any ) : any ;
188+ freeze < T > ( o : T ) : T ;
189189
190190 /**
191191 * Prevents the addition of new properties to an object.
192192 * @param o Object to make non-extensible.
193193 */
194- preventExtensions ( o : any ) : any ;
194+ preventExtensions < T > ( o : T ) : T ;
195195
196196 /**
197197 * 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 {
425425 */
426426 substr ( from : number , length ?: number ) : string ;
427427
428+ /** Returns the primitive value of the specified object. */
429+ valueOf ( ) : string ;
430+
428431 [ index : number ] : string ;
429432}
430433
@@ -477,6 +480,9 @@ interface Number {
477480 * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
478481 */
479482 toPrecision ( precision ?: number ) : string ;
483+
484+ /** Returns the primitive value of the specified object. */
485+ valueOf ( ) : number ;
480486}
481487
482488interface NumberConstructor {
Original file line number Diff line number Diff line change @@ -179,19 +179,19 @@ interface ObjectConstructor {
179179 * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
180180 * @param o Object on which to lock the attributes.
181181 */
182- seal ( o : any ) : any ;
182+ seal < T > ( o : T ) : T ;
183183
184184 /**
185185 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
186186 * @param o Object on which to lock the attributes.
187187 */
188- freeze ( o : any ) : any ;
188+ freeze < T > ( o : T ) : T ;
189189
190190 /**
191191 * Prevents the addition of new properties to an object.
192192 * @param o Object to make non-extensible.
193193 */
194- preventExtensions ( o : any ) : any ;
194+ preventExtensions < T > ( o : T ) : T ;
195195
196196 /**
197197 * 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 {
425425 */
426426 substr ( from : number , length ?: number ) : string ;
427427
428+ /** Returns the primitive value of the specified object. */
429+ valueOf ( ) : string ;
430+
428431 [ index : number ] : string ;
429432}
430433
@@ -477,6 +480,9 @@ interface Number {
477480 * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
478481 */
479482 toPrecision ( precision ?: number ) : string ;
483+
484+ /** Returns the primitive value of the specified object. */
485+ valueOf ( ) : number ;
480486}
481487
482488interface NumberConstructor {
Original file line number Diff line number Diff line change @@ -179,19 +179,19 @@ interface ObjectConstructor {
179179 * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
180180 * @param o Object on which to lock the attributes.
181181 */
182- seal(o: any ): any ;
182+ seal<T> (o: T ): T ;
183183
184184 /**
185185 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
186186 * @param o Object on which to lock the attributes.
187187 */
188- freeze(o: any ): any ;
188+ freeze<T> (o: T ): T ;
189189
190190 /**
191191 * Prevents the addition of new properties to an object.
192192 * @param o Object to make non-extensible.
193193 */
194- preventExtensions(o: any ): any ;
194+ preventExtensions<T> (o: T ): T ;
195195
196196 /**
197197 * 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 {
425425 */
426426 substr(from: number, length?: number): string;
427427
428+ /** Returns the primitive value of the specified object. */
429+ valueOf(): string;
430+
428431 [index: number]: string;
429432}
430433
@@ -477,6 +480,9 @@ interface Number {
477480 * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
478481 */
479482 toPrecision(precision?: number): string;
483+
484+ /** Returns the primitive value of the specified object. */
485+ valueOf(): number;
480486}
481487
482488interface NumberConstructor {
Original file line number Diff line number Diff line change @@ -179,19 +179,19 @@ interface ObjectConstructor {
179179 * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
180180 * @param o Object on which to lock the attributes.
181181 */
182- seal(o: any ): any ;
182+ seal<T> (o: T ): T ;
183183
184184 /**
185185 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
186186 * @param o Object on which to lock the attributes.
187187 */
188- freeze(o: any ): any ;
188+ freeze<T> (o: T ): T ;
189189
190190 /**
191191 * Prevents the addition of new properties to an object.
192192 * @param o Object to make non-extensible.
193193 */
194- preventExtensions(o: any ): any ;
194+ preventExtensions<T> (o: T ): T ;
195195
196196 /**
197197 * 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 {
425425 */
426426 substr(from: number, length?: number): string;
427427
428+ /** Returns the primitive value of the specified object. */
429+ valueOf(): string;
430+
428431 [index: number]: string;
429432}
430433
@@ -477,6 +480,9 @@ interface Number {
477480 * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
478481 */
479482 toPrecision(precision?: number): string;
483+
484+ /** Returns the primitive value of the specified object. */
485+ valueOf(): number;
480486}
481487
482488interface NumberConstructor {
You can’t perform that action at this time.
0 commit comments