Skip to content

Commit 62cbe97

Browse files
committed
Merge pull request #2332 from Microsoft/updateLKG
Update LKG
2 parents be4ff97 + 3a9df5f commit 62cbe97

12 files changed

+22803
-7622
lines changed

bin/lib.core.d.ts

+9-3
Original file line numberDiff line numberDiff 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

482488
interface NumberConstructor {

bin/lib.core.es6.d.ts

+9-3
Original file line numberDiff line numberDiff 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

482488
interface NumberConstructor {

bin/lib.d.ts

+9-3
Original file line numberDiff line numberDiff 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

482488
interface NumberConstructor {

bin/lib.es6.d.ts

+9-3
Original file line numberDiff line numberDiff 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

482488
interface NumberConstructor {

0 commit comments

Comments
 (0)