Skip to content

Commit 75466e6

Browse files
committed
Merge branch 'master' into addEsModule
2 parents e9d590f + babddd6 commit 75466e6

File tree

1,044 files changed

+44452
-19378
lines changed

Some content is hidden

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

1,044 files changed

+44452
-19378
lines changed

Jakefile.js

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ var serverSources = [
103103
"server.ts"
104104
].map(function (f) {
105105
return path.join(serverDirectory, f);
106-
});
106+
}).concat(servicesSources);
107107

108108
var languageServiceLibrarySources = [
109109
"editorServices.ts",
@@ -361,7 +361,7 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
361361
/*keepComments*/ true,
362362
/*noResolve*/ false,
363363
/*stripInternal*/ true,
364-
/*callback*/ function () {
364+
/*callback*/ function () {
365365
jake.cpR(servicesFile, nodePackageFile, {silent: true});
366366

367367
prependFile(copyright, standaloneDefinitionsFile);
@@ -379,12 +379,12 @@ compileFile(serverFile, serverSources,[builtLocalDirectory, copyright].concat(se
379379

380380
var lsslFile = path.join(builtLocalDirectory, "tslssl.js");
381381
compileFile(
382-
lsslFile,
383-
languageServiceLibrarySources,
382+
lsslFile,
383+
languageServiceLibrarySources,
384384
[builtLocalDirectory, copyright].concat(languageServiceLibrarySources),
385-
/*prefixes*/ [copyright],
386-
/*useBuiltCompiler*/ true,
387-
/*noOutFile*/ false,
385+
/*prefixes*/ [copyright],
386+
/*useBuiltCompiler*/ true,
387+
/*noOutFile*/ false,
388388
/*generateDeclarations*/ true);
389389

390390
// Local target to build the language service server library
@@ -488,7 +488,7 @@ var refTest262Baseline = path.join(internalTests, "baselines/test262/reference")
488488
desc("Builds the test infrastructure using the built compiler");
489489
task("tests", ["local", run].concat(libraryTargets));
490490

491-
function exec(cmd, completeHandler) {
491+
function exec(cmd, completeHandler, errorHandler) {
492492
var ex = jake.createExec([cmd], {windowsVerbatimArguments: true});
493493
// Add listeners for output and error
494494
ex.addListener("stdout", function(output) {
@@ -504,8 +504,12 @@ function exec(cmd, completeHandler) {
504504
complete();
505505
});
506506
ex.addListener("error", function(e, status) {
507-
fail("Process exited with code " + status);
508-
})
507+
if(errorHandler) {
508+
errorHandler(e, status);
509+
} else {
510+
fail("Process exited with code " + status);
511+
}
512+
});
509513

510514
ex.run();
511515
}
@@ -715,3 +719,23 @@ task('tsc-instrumented', [loggedIOJsPath, instrumenterJsPath, tscFile], function
715719
});
716720
ex.run();
717721
}, { async: true });
722+
723+
desc("Updates the sublime plugin's tsserver");
724+
task("update-sublime", ["local", serverFile], function() {
725+
jake.cpR(serverFile, "../TypeScript-Sublime-Plugin/tsserver/");
726+
jake.cpR(serverFile + ".map", "../TypeScript-Sublime-Plugin/tsserver/");
727+
});
728+
729+
// if the codebase were free of linter errors we could make jake runtests
730+
// run this task automatically
731+
desc("Runs tslint on the compiler sources");
732+
task("lint", [], function() {
733+
for(var i in compilerSources) {
734+
var f = compilerSources[i];
735+
var cmd = 'tslint -f ' + f;
736+
exec(cmd,
737+
function() { console.log('SUCCESS: No linter errors'); },
738+
function() { console.log('FAILURE: Please fix linting errors in ' + f + '\n');
739+
});
740+
}
741+
}, { async: true });

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
[![Build Status](https://travis-ci.org/Microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript)
2-
[![Issue Stats](http://issuestats.com/github/Microsoft/TypeScript/badge/pr)](http://issuestats.com/github/microsoft/typescript)
3-
[![Issue Stats](http://issuestats.com/github/Microsoft/TypeScript/badge/issue)](http://issuestats.com/github/microsoft/typescript)
42
[![npm version](https://badge.fury.io/js/typescript.svg)](http://badge.fury.io/js/typescript)
53
[![Downloads](http://img.shields.io/npm/dm/TypeScript.svg)](https://npmjs.org/package/typescript)
64

bin/lib.core.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ interface ArrayConstructor {
11651165
(arrayLength?: number): any[];
11661166
<T>(arrayLength: number): T[];
11671167
<T>(...items: T[]): T[];
1168-
isArray(arg: any): boolean;
1168+
isArray(arg: any): arg is Array<any>;
11691169
prototype: Array<any>;
11701170
}
11711171

bin/lib.core.es6.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ interface ArrayConstructor {
11651165
(arrayLength?: number): any[];
11661166
<T>(arrayLength: number): T[];
11671167
<T>(...items: T[]): T[];
1168-
isArray(arg: any): boolean;
1168+
isArray(arg: any): arg is Array<any>;
11691169
prototype: Array<any>;
11701170
}
11711171

@@ -1880,6 +1880,7 @@ interface Map<K, V> {
18801880
}
18811881

18821882
interface MapConstructor {
1883+
new (): Map<any, any>;
18831884
new <K, V>(): Map<K, V>;
18841885
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
18851886
prototype: Map<any, any>;
@@ -1896,6 +1897,7 @@ interface WeakMap<K, V> {
18961897
}
18971898

18981899
interface WeakMapConstructor {
1900+
new (): WeakMap<any, any>;
18991901
new <K, V>(): WeakMap<K, V>;
19001902
new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
19011903
prototype: WeakMap<any, any>;
@@ -1917,6 +1919,7 @@ interface Set<T> {
19171919
}
19181920

19191921
interface SetConstructor {
1922+
new (): Set<any>;
19201923
new <T>(): Set<T>;
19211924
new <T>(iterable: Iterable<T>): Set<T>;
19221925
prototype: Set<any>;
@@ -1932,6 +1935,7 @@ interface WeakSet<T> {
19321935
}
19331936

19341937
interface WeakSetConstructor {
1938+
new (): WeakSet<any>;
19351939
new <T>(): WeakSet<T>;
19361940
new <T>(iterable: Iterable<T>): WeakSet<T>;
19371941
prototype: WeakSet<any>;

bin/lib.d.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ interface ArrayConstructor {
11651165
(arrayLength?: number): any[];
11661166
<T>(arrayLength: number): T[];
11671167
<T>(...items: T[]): T[];
1168-
isArray(arg: any): boolean;
1168+
isArray(arg: any): arg is Array<any>;
11691169
prototype: Array<any>;
11701170
}
11711171

@@ -3531,6 +3531,11 @@ declare module Intl {
35313531
currency?: string;
35323532
currencyDisplay?: string;
35333533
useGrouping?: boolean;
3534+
minimumintegerDigits?: number;
3535+
minimumFractionDigits?: number;
3536+
maximumFractionDigits?: number;
3537+
minimumSignificantDigits?: number;
3538+
maximumSignificantDigits?: number;
35343539
}
35353540

35363541
interface ResolvedNumberFormatOptions {
@@ -3593,7 +3598,7 @@ declare module Intl {
35933598
}
35943599

35953600
interface DateTimeFormat {
3596-
format(date: number): string;
3601+
format(date?: Date | number): string;
35973602
resolvedOptions(): ResolvedDateTimeFormatOptions;
35983603
}
35993604
var DateTimeFormat: {

bin/lib.dom.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2361,6 +2361,11 @@ declare module Intl {
23612361
currency?: string;
23622362
currencyDisplay?: string;
23632363
useGrouping?: boolean;
2364+
minimumintegerDigits?: number;
2365+
minimumFractionDigits?: number;
2366+
maximumFractionDigits?: number;
2367+
minimumSignificantDigits?: number;
2368+
maximumSignificantDigits?: number;
23642369
}
23652370

23662371
interface ResolvedNumberFormatOptions {
@@ -2423,7 +2428,7 @@ declare module Intl {
24232428
}
24242429

24252430
interface DateTimeFormat {
2426-
format(date: number): string;
2431+
format(date?: Date | number): string;
24272432
resolvedOptions(): ResolvedDateTimeFormatOptions;
24282433
}
24292434
var DateTimeFormat: {

bin/lib.es6.d.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ interface ArrayConstructor {
11651165
(arrayLength?: number): any[];
11661166
<T>(arrayLength: number): T[];
11671167
<T>(...items: T[]): T[];
1168-
isArray(arg: any): boolean;
1168+
isArray(arg: any): arg is Array<any>;
11691169
prototype: Array<any>;
11701170
}
11711171

@@ -1880,6 +1880,7 @@ interface Map<K, V> {
18801880
}
18811881

18821882
interface MapConstructor {
1883+
new (): Map<any, any>;
18831884
new <K, V>(): Map<K, V>;
18841885
new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
18851886
prototype: Map<any, any>;
@@ -1896,6 +1897,7 @@ interface WeakMap<K, V> {
18961897
}
18971898

18981899
interface WeakMapConstructor {
1900+
new (): WeakMap<any, any>;
18991901
new <K, V>(): WeakMap<K, V>;
19001902
new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
19011903
prototype: WeakMap<any, any>;
@@ -1917,6 +1919,7 @@ interface Set<T> {
19171919
}
19181920

19191921
interface SetConstructor {
1922+
new (): Set<any>;
19201923
new <T>(): Set<T>;
19211924
new <T>(iterable: Iterable<T>): Set<T>;
19221925
prototype: Set<any>;
@@ -1932,6 +1935,7 @@ interface WeakSet<T> {
19321935
}
19331936

19341937
interface WeakSetConstructor {
1938+
new (): WeakSet<any>;
19351939
new <T>(): WeakSet<T>;
19361940
new <T>(iterable: Iterable<T>): WeakSet<T>;
19371941
prototype: WeakSet<any>;
@@ -4909,6 +4913,11 @@ declare module Intl {
49094913
currency?: string;
49104914
currencyDisplay?: string;
49114915
useGrouping?: boolean;
4916+
minimumintegerDigits?: number;
4917+
minimumFractionDigits?: number;
4918+
maximumFractionDigits?: number;
4919+
minimumSignificantDigits?: number;
4920+
maximumSignificantDigits?: number;
49124921
}
49134922

49144923
interface ResolvedNumberFormatOptions {
@@ -4971,7 +4980,7 @@ declare module Intl {
49714980
}
49724981

49734982
interface DateTimeFormat {
4974-
format(date: number): string;
4983+
format(date?: Date | number): string;
49754984
resolvedOptions(): ResolvedDateTimeFormatOptions;
49764985
}
49774986
var DateTimeFormat: {
@@ -18015,7 +18024,17 @@ declare function addEventListener(type: "volumechange", listener: (ev: Event) =>
1801518024
declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
1801618025
declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
1801718026
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
18027+
interface DOMTokenList {
18028+
[Symbol.iterator](): IterableIterator<string>;
18029+
}
1801818030

18031+
interface NodeList {
18032+
[Symbol.iterator](): IterableIterator<Node>
18033+
}
18034+
18035+
interface NodeListOf<TNode extends Node> {
18036+
[Symbol.iterator](): IterableIterator<TNode>
18037+
}
1801918038
/////////////////////////////
1802018039
/// WorkerGlobalScope APIs
1802118040
/////////////////////////////

bin/lib.webworker.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2361,6 +2361,11 @@ declare module Intl {
23612361
currency?: string;
23622362
currencyDisplay?: string;
23632363
useGrouping?: boolean;
2364+
minimumintegerDigits?: number;
2365+
minimumFractionDigits?: number;
2366+
maximumFractionDigits?: number;
2367+
minimumSignificantDigits?: number;
2368+
maximumSignificantDigits?: number;
23642369
}
23652370

23662371
interface ResolvedNumberFormatOptions {
@@ -2423,7 +2428,7 @@ declare module Intl {
24232428
}
24242429

24252430
interface DateTimeFormat {
2426-
format(date: number): string;
2431+
format(date?: Date | number): string;
24272432
resolvedOptions(): ResolvedDateTimeFormatOptions;
24282433
}
24292434
var DateTimeFormat: {

0 commit comments

Comments
 (0)