Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 346d488

Browse filesBrowse files
committed
Merge branch 'master' into emitHelper
2 parents bac9350 + 73ada7a commit 346d488
Copy full SHA for 346d488

546 files changed

+172,285-143,576Lines changed: 172285 additions & 143576 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Gulpfile.ts‎

Copy file name to clipboardExpand all lines: Gulpfile.ts
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ const es2016LibrarySourceMap = es2016LibrarySource.map(function(source) {
128128

129129
const es2017LibrarySource = [
130130
"es2017.object.d.ts",
131-
"es2017.sharedmemory.d.ts"
131+
"es2017.sharedmemory.d.ts",
132+
"es2017.string.d.ts",
132133
];
133134

134135
const es2017LibrarySourceMap = es2017LibrarySource.map(function(source) {
@@ -176,7 +177,7 @@ for (const i in libraryTargets) {
176177
const configureNightlyJs = path.join(scriptsDirectory, "configureNightly.js");
177178
const configureNightlyTs = path.join(scriptsDirectory, "configureNightly.ts");
178179
const packageJson = "package.json";
179-
const programTs = path.join(compilerDirectory, "program.ts");
180+
const versionFile = path.join(compilerDirectory, "core.ts");
180181

181182
function needsUpdate(source: string | string[], dest: string | string[]): boolean {
182183
if (typeof source === "string" && typeof dest === "string") {
@@ -284,7 +285,7 @@ gulp.task(configureNightlyJs, false, [], () => {
284285

285286
// Nightly management tasks
286287
gulp.task("configure-nightly", "Runs scripts/configureNightly.ts to prepare a build for nightly publishing", [configureNightlyJs], (done) => {
287-
exec(host, [configureNightlyJs, packageJson, programTs], done, done);
288+
exec(host, [configureNightlyJs, packageJson, versionFile], done, done);
288289
});
289290
gulp.task("publish-nightly", "Runs `npm publish --tag next` to create a new nightly build on npm", ["LKG"], () => {
290291
return runSequence("clean", "useDebugMode", "runtests", (done) => {
Collapse file

‎Jakefile.js‎

Copy file name to clipboardExpand all lines: Jakefile.js
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ var compilerSources = [
7171
"transformers/destructuring.ts",
7272
"transformers/ts.ts",
7373
"transformers/jsx.ts",
74+
"transformers/esnext.ts",
7475
"transformers/es2017.ts",
7576
"transformers/es2016.ts",
7677
"transformers/es2015.ts",
@@ -107,6 +108,7 @@ var servicesSources = [
107108
"transformers/destructuring.ts",
108109
"transformers/ts.ts",
109110
"transformers/jsx.ts",
111+
"transformers/esnext.ts",
110112
"transformers/es2017.ts",
111113
"transformers/es2016.ts",
112114
"transformers/es2015.ts",
@@ -301,7 +303,8 @@ var es2016LibrarySourceMap = es2016LibrarySource.map(function (source) {
301303

302304
var es2017LibrarySource = [
303305
"es2017.object.d.ts",
304-
"es2017.sharedmemory.d.ts"
306+
"es2017.sharedmemory.d.ts",
307+
"es2017.string.d.ts",
305308
];
306309

307310
var es2017LibrarySourceMap = es2017LibrarySource.map(function (source) {
@@ -590,7 +593,7 @@ task("generate-diagnostics", [diagnosticInfoMapTs]);
590593
var configureNightlyJs = path.join(scriptsDirectory, "configureNightly.js");
591594
var configureNightlyTs = path.join(scriptsDirectory, "configureNightly.ts");
592595
var packageJson = "package.json";
593-
var programTs = path.join(compilerDirectory, "program.ts");
596+
var versionFile = path.join(compilerDirectory, "core.ts");
594597

595598
file(configureNightlyTs);
596599

@@ -606,7 +609,7 @@ task("setDebugMode", function () {
606609
});
607610

608611
task("configure-nightly", [configureNightlyJs], function () {
609-
var cmd = host + " " + configureNightlyJs + " " + packageJson + " " + programTs;
612+
var cmd = host + " " + configureNightlyJs + " " + packageJson + " " + versionFile;
610613
console.log(cmd);
611614
exec(cmd);
612615
}, { async: true });
@@ -637,7 +640,7 @@ task("importDefinitelyTypedTests", [importDefinitelyTypedTestsJs], function () {
637640

638641
// Local target to build the compiler and services
639642
var tscFile = path.join(builtLocalDirectory, compilerFilename);
640-
compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false);
643+
compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false, { noMapRoot: true });
641644

642645
var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
643646
var servicesFileInBrowserTest = path.join(builtLocalDirectory, "typescriptServicesInBrowserTest.js");
Collapse file

‎lib/cancellationToken.js‎

Copy file name to clipboardExpand all lines: lib/cancellationToken.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,3 @@ function createCancellationToken(args) {
3939
};
4040
}
4141
module.exports = createCancellationToken;
42-
43-
//# sourceMappingURL=cancellationToken.js.map
Collapse file

‎lib/lib.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.d.ts
+14-10Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5836,6 +5836,7 @@ interface CSSStyleDeclaration {
58365836
writingMode: string | null;
58375837
zIndex: string | null;
58385838
zoom: string | null;
5839+
resize: string | null;
58395840
getPropertyPriority(propertyName: string): string;
58405841
getPropertyValue(propertyName: string): string;
58415842
item(index: number): string;
@@ -5905,6 +5906,7 @@ declare var CanvasGradient: {
59055906
}
59065907

59075908
interface CanvasPattern {
5909+
setTransform(matrix: SVGMatrix): void;
59085910
}
59095911

59105912
declare var CanvasPattern: {
@@ -6330,7 +6332,7 @@ interface DataTransfer {
63306332
effectAllowed: string;
63316333
readonly files: FileList;
63326334
readonly items: DataTransferItemList;
6333-
readonly types: DOMStringList;
6335+
readonly types: string[];
63346336
clearData(format?: string): boolean;
63356337
getData(format: string): string;
63366338
setData(format: string, data: string): boolean;
@@ -12759,7 +12761,7 @@ interface MouseEvent extends UIEvent {
1275912761
readonly x: number;
1276012762
readonly y: number;
1276112763
getModifierState(keyArg: string): boolean;
12762-
initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;
12764+
initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
1276312765
}
1276412766

1276512767
declare var MouseEvent: {
@@ -12872,6 +12874,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
1287212874
readonly plugins: PluginArray;
1287312875
readonly pointerEnabled: boolean;
1287412876
readonly webdriver: boolean;
12877+
readonly hardwareConcurrency: number;
1287512878
getGamepads(): Gamepad[];
1287612879
javaEnabled(): boolean;
1287712880
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
@@ -12889,18 +12892,18 @@ interface Node extends EventTarget {
1288912892
readonly attributes: NamedNodeMap;
1289012893
readonly baseURI: string | null;
1289112894
readonly childNodes: NodeList;
12892-
readonly firstChild: Node;
12893-
readonly lastChild: Node;
12895+
readonly firstChild: Node | null;
12896+
readonly lastChild: Node | null;
1289412897
readonly localName: string | null;
1289512898
readonly namespaceURI: string | null;
12896-
readonly nextSibling: Node;
12899+
readonly nextSibling: Node | null;
1289712900
readonly nodeName: string;
1289812901
readonly nodeType: number;
1289912902
nodeValue: string | null;
1290012903
readonly ownerDocument: Document;
12901-
readonly parentElement: HTMLElement;
12902-
readonly parentNode: Node;
12903-
readonly previousSibling: Node;
12904+
readonly parentElement: HTMLElement | null;
12905+
readonly parentNode: Node | null;
12906+
readonly previousSibling: Node | null;
1290412907
textContent: string | null;
1290512908
appendChild(newChild: Node): Node;
1290612909
cloneNode(deep?: boolean): Node;
@@ -17010,7 +17013,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
1701017013
readonly devicePixelRatio: number;
1701117014
readonly doNotTrack: string;
1701217015
readonly document: Document;
17013-
event: Event;
17016+
event: Event | undefined;
1701417017
readonly external: External;
1701517018
readonly frameElement: Element;
1701617019
readonly frames: Window;
@@ -17312,6 +17315,7 @@ interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
1731217315
readonly upload: XMLHttpRequestUpload;
1731317316
withCredentials: boolean;
1731417317
msCaching?: string;
17318+
readonly responseURL: string;
1731517319
abort(): void;
1731617320
getAllResponseHeaders(): string;
1731717321
getResponseHeader(header: string): string | null;
@@ -18458,7 +18462,7 @@ declare var defaultStatus: string;
1845818462
declare var devicePixelRatio: number;
1845918463
declare var doNotTrack: string;
1846018464
declare var document: Document;
18461-
declare var event: Event;
18465+
declare var event: Event | undefined;
1846218466
declare var external: External;
1846318467
declare var frameElement: Element;
1846418468
declare var frames: Window;
Collapse file

‎lib/lib.dom.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.dom.d.ts
+14-10Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,7 @@ interface CSSStyleDeclaration {
16991699
writingMode: string | null;
17001700
zIndex: string | null;
17011701
zoom: string | null;
1702+
resize: string | null;
17021703
getPropertyPriority(propertyName: string): string;
17031704
getPropertyValue(propertyName: string): string;
17041705
item(index: number): string;
@@ -1768,6 +1769,7 @@ declare var CanvasGradient: {
17681769
}
17691770

17701771
interface CanvasPattern {
1772+
setTransform(matrix: SVGMatrix): void;
17711773
}
17721774

17731775
declare var CanvasPattern: {
@@ -2193,7 +2195,7 @@ interface DataTransfer {
21932195
effectAllowed: string;
21942196
readonly files: FileList;
21952197
readonly items: DataTransferItemList;
2196-
readonly types: DOMStringList;
2198+
readonly types: string[];
21972199
clearData(format?: string): boolean;
21982200
getData(format: string): string;
21992201
setData(format: string, data: string): boolean;
@@ -8622,7 +8624,7 @@ interface MouseEvent extends UIEvent {
86228624
readonly x: number;
86238625
readonly y: number;
86248626
getModifierState(keyArg: string): boolean;
8625-
initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;
8627+
initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
86268628
}
86278629

86288630
declare var MouseEvent: {
@@ -8735,6 +8737,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
87358737
readonly plugins: PluginArray;
87368738
readonly pointerEnabled: boolean;
87378739
readonly webdriver: boolean;
8740+
readonly hardwareConcurrency: number;
87388741
getGamepads(): Gamepad[];
87398742
javaEnabled(): boolean;
87408743
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
@@ -8752,18 +8755,18 @@ interface Node extends EventTarget {
87528755
readonly attributes: NamedNodeMap;
87538756
readonly baseURI: string | null;
87548757
readonly childNodes: NodeList;
8755-
readonly firstChild: Node;
8756-
readonly lastChild: Node;
8758+
readonly firstChild: Node | null;
8759+
readonly lastChild: Node | null;
87578760
readonly localName: string | null;
87588761
readonly namespaceURI: string | null;
8759-
readonly nextSibling: Node;
8762+
readonly nextSibling: Node | null;
87608763
readonly nodeName: string;
87618764
readonly nodeType: number;
87628765
nodeValue: string | null;
87638766
readonly ownerDocument: Document;
8764-
readonly parentElement: HTMLElement;
8765-
readonly parentNode: Node;
8766-
readonly previousSibling: Node;
8767+
readonly parentElement: HTMLElement | null;
8768+
readonly parentNode: Node | null;
8769+
readonly previousSibling: Node | null;
87678770
textContent: string | null;
87688771
appendChild(newChild: Node): Node;
87698772
cloneNode(deep?: boolean): Node;
@@ -12873,7 +12876,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
1287312876
readonly devicePixelRatio: number;
1287412877
readonly doNotTrack: string;
1287512878
readonly document: Document;
12876-
event: Event;
12879+
event: Event | undefined;
1287712880
readonly external: External;
1287812881
readonly frameElement: Element;
1287912882
readonly frames: Window;
@@ -13175,6 +13178,7 @@ interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
1317513178
readonly upload: XMLHttpRequestUpload;
1317613179
withCredentials: boolean;
1317713180
msCaching?: string;
13181+
readonly responseURL: string;
1317813182
abort(): void;
1317913183
getAllResponseHeaders(): string;
1318013184
getResponseHeader(header: string): string | null;
@@ -14321,7 +14325,7 @@ declare var defaultStatus: string;
1432114325
declare var devicePixelRatio: number;
1432214326
declare var doNotTrack: string;
1432314327
declare var document: Document;
14324-
declare var event: Event;
14328+
declare var event: Event | undefined;
1432514329
declare var external: External;
1432614330
declare var frameElement: Element;
1432714331
declare var frames: Window;
Collapse file

‎lib/lib.es2015.core.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.es2015.core.d.ts
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,27 +225,27 @@ interface NumberConstructor {
225225
* number. Only finite values of the type number, result in true.
226226
* @param number A numeric value.
227227
*/
228-
isFinite(number: number): boolean;
228+
isFinite(value: any): value is number;
229229

230230
/**
231231
* Returns true if the value passed is an integer, false otherwise.
232232
* @param number A numeric value.
233233
*/
234-
isInteger(number: number): boolean;
234+
isInteger(value: any): value is number;
235235

236236
/**
237237
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
238238
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
239239
* to a number. Only values of the type number, that are also NaN, result in true.
240240
* @param number A numeric value.
241241
*/
242-
isNaN(number: number): boolean;
242+
isNaN(value: any): value is number;
243243

244244
/**
245245
* Returns true if the value passed is a safe integer.
246246
* @param number A numeric value.
247247
*/
248-
isSafeInteger(number: number): boolean;
248+
isSafeInteger(value: any): value is number;
249249

250250
/**
251251
* The value of the largest integer n such that n and n + 1 are both exactly representable as
Collapse file

‎lib/lib.es2015.proxy.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.es2015.proxy.d.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ and limitations under the License.
1919

2020

2121
interface ProxyHandler<T> {
22-
getPrototypeOf? (target: T): any;
22+
getPrototypeOf? (target: T): {} | null;
2323
setPrototypeOf? (target: T, v: any): boolean;
2424
isExtensible? (target: T): boolean;
2525
preventExtensions? (target: T): boolean;
@@ -32,11 +32,11 @@ interface ProxyHandler<T> {
3232
enumerate? (target: T): PropertyKey[];
3333
ownKeys? (target: T): PropertyKey[];
3434
apply? (target: T, thisArg: any, argArray?: any): any;
35-
construct? (target: T, thisArg: any, argArray?: any): any;
35+
construct? (target: T, argArray: any, newTarget?: any): {};
3636
}
3737

3838
interface ProxyConstructor {
3939
revocable<T>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
4040
new <T>(target: T, handler: ProxyHandler<T>): T
4141
}
42-
declare var Proxy: ProxyConstructor;
42+
declare var Proxy: ProxyConstructor;
Collapse file

‎lib/lib.es2017.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.es2017.d.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ and limitations under the License.
2020

2121
/// <reference path="lib.es2016.d.ts" />
2222
/// <reference path="lib.es2017.object.d.ts" />
23-
/// <reference path="lib.es2017.sharedmemory.d.ts" />
23+
/// <reference path="lib.es2017.sharedmemory.d.ts" />
24+
/// <reference path="lib.es2017.string.d.ts" />
Collapse file

‎lib/lib.es2017.object.d.ts‎

Copy file name to clipboardExpand all lines: lib/lib.es2017.object.d.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ interface ObjectConstructor {
2929
* Returns an array of key/values of the enumerable properties of an object
3030
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
3131
*/
32-
entries<T>(o: { [s: string]: T }): [string, T][];
32+
entries<T extends { [key: string]: any }, K extends keyof T>(o: T): [keyof T, T[K]][];
3333
entries(o: any): [string, any][];
34-
}
34+
}
Collapse file

‎lib/lib.es2017.string.d.ts‎

Copy file name to clipboard
+47Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
18+
/// <reference no-default-lib="true"/>
19+
20+
21+
interface String {
22+
/**
23+
* Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
24+
* The padding is applied from the start (left) of the current string.
25+
*
26+
* @param maxLength The length of the resulting string once the current string has been padded.
27+
* If this parameter is smaller than the current string's length, the current string will be returned as it is.
28+
*
29+
* @param fillString The string to pad the current string with.
30+
* If this string is too long, it will be truncated and the left-most part will be applied.
31+
* The default value for this parameter is " " (U+0020).
32+
*/
33+
padStart(maxLength: number, fillString?: string): string;
34+
35+
/**
36+
* Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
37+
* The padding is applied from the end (right) of the current string.
38+
*
39+
* @param maxLength The length of the resulting string once the current string has been padded.
40+
* If this parameter is smaller than the current string's length, the current string will be returned as it is.
41+
*
42+
* @param fillString The string to pad the current string with.
43+
* If this string is too long, it will be truncated and the left-most part will be applied.
44+
* The default value for this parameter is " " (U+0020).
45+
*/
46+
padEnd(maxLength: number, fillString?: string): string;
47+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.