Skip to content

Commit 85b53c7

Browse files
committed
Merge branch 'master' into classifier
2 parents be47b94 + 2a106bf commit 85b53c7

File tree

55 files changed

+2829
-1337
lines changed

Some content is hidden

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

55 files changed

+2829
-1337
lines changed

Jakefile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var compilerSources = [
3535
"checker.ts",
3636
"emitter.ts",
3737
"commandLineParser.ts",
38-
"tc.ts",
38+
"tsc.ts",
3939
"diagnosticInformationMap.generated.ts"
4040
].map(function (f) {
4141
return path.join(compilerDirectory, f);
@@ -134,7 +134,7 @@ var useDebugMode = false;
134134
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile) {
135135
file(outFile, prereqs, function() {
136136
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
137-
var compilerFilename = "tc.js";
137+
var compilerFilename = "tsc.js";
138138
var options = "-removeComments --module commonjs -noImplicitAny "; //" -propagateEnumConstants "
139139

140140
var cmd = (process.env.host || process.env.TYPESCRIPT_HOST || "node") + " " + dir + compilerFilename + " " + options + " ";
@@ -230,15 +230,15 @@ task("generate-diagnostics", [diagnosticInfoMapTs])
230230

231231

232232
// Local target to build the compiler and services
233-
var tcFile = path.join(builtLocalDirectory, "tc.js");
234-
compileFile(tcFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false);
233+
var tscFile = path.join(builtLocalDirectory, "tsc.js");
234+
compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false);
235235

236-
var tcServicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
237-
compileFile(tcServicesFile, servicesSources, [builtLocalDirectory, copyright].concat(servicesSources), [copyright], /*useBuiltCompiler:*/ true);
236+
var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
237+
compileFile(servicesFile, servicesSources, [builtLocalDirectory, copyright].concat(servicesSources), [copyright], /*useBuiltCompiler:*/ true);
238238

239239
// Local target to build the compiler and services
240240
desc("Builds the full compiler and services");
241-
task("local", ["generate-diagnostics", "lib", tcFile, tcServicesFile]);
241+
task("local", ["generate-diagnostics", "lib", tscFile, servicesFile]);
242242

243243

244244
// Local target to build the compiler and services
@@ -261,7 +261,7 @@ task("clean", function() {
261261
// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
262262
desc("Makes a new LKG out of the built js files");
263263
task("LKG", libraryTargets, function() {
264-
var expectedFiles = [tcFile, tcServicesFile].concat(libraryTargets);
264+
var expectedFiles = [tscFile, servicesFile].concat(libraryTargets);
265265
var missingFiles = expectedFiles.filter(function (f) {
266266
return !fs.existsSync(f);
267267
});
@@ -285,7 +285,7 @@ directory(builtLocalDirectory);
285285

286286
// Task to build the tests infrastructure using the built compiler
287287
var run = path.join(builtLocalDirectory, "run.js");
288-
compileFile(run, harnessSources, [builtLocalDirectory, tcFile].concat(libraryTargets).concat(harnessSources), [], /*useBuiltCompiler:*/ true);
288+
compileFile(run, harnessSources, [builtLocalDirectory, tscFile].concat(libraryTargets).concat(harnessSources), [], /*useBuiltCompiler:*/ true);
289289

290290
var localBaseline = "tests/baselines/local/";
291291
var refBaseline = "tests/baselines/reference/";
@@ -385,7 +385,7 @@ task("generate-code-coverage", ["tests", builtLocalDirectory], function () {
385385
// Browser tests
386386
var nodeServerOutFile = 'tests/webTestServer.js'
387387
var nodeServerInFile = 'tests/webTestServer.ts'
388-
compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tcFile], [], true, true);
388+
compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tscFile], [], true, true);
389389

390390
desc("Runs browserify on run.js to produce a file suitable for running tests in the browser");
391391
task("browserify", ["tests", builtLocalDirectory, nodeServerOutFile], function() {
@@ -460,16 +460,16 @@ task("baseline-accept-rwc", function() {
460460
// Webhost
461461
var webhostPath = "tests/webhost/webtsc.ts";
462462
var webhostJsPath = "tests/webhost/webtsc.js";
463-
compileFile(webhostJsPath, [webhostPath], [tcFile, webhostPath].concat(libraryTargets), [], true);
463+
compileFile(webhostJsPath, [webhostPath], [tscFile, webhostPath].concat(libraryTargets), [], true);
464464

465465
desc("Builds the tsc web host");
466466
task("webhost", [webhostJsPath], function() {
467467
jake.cpR(path.join(builtLocalDirectory, "lib.d.ts"), "tests/webhost/", {silent: true});
468468
});
469469

470470
// Perf compiler
471-
var perftcPath = "tests/perftc.ts";
472-
var perftcJsPath = "built/local/perftc.js";
473-
compileFile(perftcJsPath, [perftcPath], [tcFile, perftcPath, "tests/perfsys.ts"].concat(libraryTargets), [], true);
471+
var perftscPath = "tests/perftsc.ts";
472+
var perftscJsPath = "built/local/perftsc.js";
473+
compileFile(perftscJsPath, [perftscPath], [tscFile, perftscPath, "tests/perfsys.ts"].concat(libraryTargets), [], true);
474474
desc("Builds augmented version of the compiler for perf tests");
475-
task("perftc", [perftcJsPath]);
475+
task("perftsc", [perftscJsPath]);

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jake -T # List the above commands.
6363
## Usage
6464

6565
```shell
66-
node built/local/tc.js hello.ts
66+
node built/local/tsc.js hello.ts
6767
```
6868

6969

bin/lib.core.d.ts

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ interface String {
317317
* Matches a string with a regular expression, and returns an array containing the results of that search.
318318
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
319319
*/
320-
match(regexp: string): string[];
320+
match(regexp: string): RegExpMatchArray;
321321

322322
/**
323323
* Matches a string with a regular expression, and returns an array containing the results of that search.
324324
* @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
325325
*/
326-
match(regexp: RegExp): string[];
326+
match(regexp: RegExp): RegExpMatchArray;
327327

328328
/**
329329
* Replaces text in a string, using a regular expression or search string.
@@ -790,39 +790,16 @@ declare var Date: {
790790
now(): number;
791791
}
792792

793-
interface RegExpExecArray {
794-
[index: number]: string;
795-
length: number;
793+
interface RegExpMatchArray extends Array<string> {
794+
index?: number;
795+
input?: string;
796+
}
796797

798+
interface RegExpExecArray extends Array<string> {
797799
index: number;
798800
input: string;
799-
800-
toString(): string;
801-
toLocaleString(): string;
802-
concat(...items: string[][]): string[];
803-
join(separator?: string): string;
804-
pop(): string;
805-
push(...items: string[]): number;
806-
reverse(): string[];
807-
shift(): string;
808-
slice(start?: number, end?: number): string[];
809-
sort(compareFn?: (a: string, b: string) => number): string[];
810-
splice(start: number): string[];
811-
splice(start: number, deleteCount: number, ...items: string[]): string[];
812-
unshift(...items: string[]): number;
813-
814-
indexOf(searchElement: string, fromIndex?: number): number;
815-
lastIndexOf(searchElement: string, fromIndex?: number): number;
816-
every(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
817-
some(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
818-
forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
819-
map(callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): any[];
820-
filter(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): string[];
821-
reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
822-
reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
823801
}
824802

825-
826803
interface RegExp {
827804
/**
828805
* Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.

bin/lib.d.ts

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ interface String {
317317
* Matches a string with a regular expression, and returns an array containing the results of that search.
318318
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
319319
*/
320-
match(regexp: string): string[];
320+
match(regexp: string): RegExpMatchArray;
321321

322322
/**
323323
* Matches a string with a regular expression, and returns an array containing the results of that search.
324324
* @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
325325
*/
326-
match(regexp: RegExp): string[];
326+
match(regexp: RegExp): RegExpMatchArray;
327327

328328
/**
329329
* Replaces text in a string, using a regular expression or search string.
@@ -790,39 +790,16 @@ declare var Date: {
790790
now(): number;
791791
}
792792

793-
interface RegExpExecArray {
794-
[index: number]: string;
795-
length: number;
793+
interface RegExpMatchArray extends Array<string> {
794+
index?: number;
795+
input?: string;
796+
}
796797

798+
interface RegExpExecArray extends Array<string> {
797799
index: number;
798800
input: string;
799-
800-
toString(): string;
801-
toLocaleString(): string;
802-
concat(...items: string[][]): string[];
803-
join(separator?: string): string;
804-
pop(): string;
805-
push(...items: string[]): number;
806-
reverse(): string[];
807-
shift(): string;
808-
slice(start?: number, end?: number): string[];
809-
sort(compareFn?: (a: string, b: string) => number): string[];
810-
splice(start: number): string[];
811-
splice(start: number, deleteCount: number, ...items: string[]): string[];
812-
unshift(...items: string[]): number;
813-
814-
indexOf(searchElement: string, fromIndex?: number): number;
815-
lastIndexOf(searchElement: string, fromIndex?: number): number;
816-
every(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
817-
some(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
818-
forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
819-
map(callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): any[];
820-
filter(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): string[];
821-
reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
822-
reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
823801
}
824802

825-
826803
interface RegExp {
827804
/**
828805
* Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.

0 commit comments

Comments
 (0)