Skip to content

Commit 513b45d

Browse files
author
Yui T
committed
Merge branch 'master' into emitClass
Conflicts: src/compiler/checker.ts src/compiler/diagnosticInformationMap.generated.ts src/compiler/diagnosticMessages.json src/compiler/emitter.ts src/compiler/parser.ts
2 parents c51983d + 85cf761 commit 513b45d

File tree

287 files changed

+15458
-9933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+15458
-9933
lines changed

Jakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
252252
options += " --stripInternal"
253253
}
254254

255+
options += " --cacheDownlevelForOfLength --preserveNewLines";
256+
255257
var cmd = host + " " + dir + compilerFilename + " " + options + " ";
256258
cmd = cmd + sources.join(" ");
257259
console.log(cmd + "\n");

bin/lib.core.d.ts

Lines changed: 9 additions & 3 deletions
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

Lines changed: 9 additions & 3 deletions
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

Lines changed: 9 additions & 3 deletions
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

Lines changed: 9 additions & 3 deletions
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)