Skip to content

Commit e5f1053

Browse files
Merge branch 'master' into iFeelPrettyErr
2 parents 40f10ab + 3e63144 commit e5f1053

File tree

190 files changed

+43861
-8421
lines changed

Some content is hidden

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

190 files changed

+43861
-8421
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ scripts/processDiagnosticMessages.js
3131
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
3232
src/harness/*.js
3333
src/compiler/diagnosticInformationMap.generated.ts
34+
src/compiler/diagnosticMessages.generated.json
3435
rwc-report.html
3536
*.swp
3637
build.json

Jakefile.js

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,17 @@ var servicesSources = [
9696
return path.join(servicesDirectory, f);
9797
}));
9898

99-
var serverSources = [
99+
var serverCoreSources = [
100100
"node.d.ts",
101101
"editorServices.ts",
102102
"protocol.d.ts",
103103
"session.ts",
104104
"server.ts"
105105
].map(function (f) {
106106
return path.join(serverDirectory, f);
107-
}).concat(servicesSources);
107+
});
108+
109+
var serverSources = serverCoreSources.concat(servicesSources);
108110

109111
var languageServiceLibrarySources = [
110112
"editorServices.ts",
@@ -145,7 +147,8 @@ var harnessSources = harnessCoreSources.concat([
145147
"transpile.ts",
146148
"reuseProgramStructure.ts",
147149
"cachingInServerLSHost.ts",
148-
"moduleResolution.ts"
150+
"moduleResolution.ts",
151+
"tsconfigParsing.ts"
149152
].map(function (f) {
150153
return path.join(unittestsDirectory, f);
151154
})).concat([
@@ -164,7 +167,7 @@ var librarySourceMap = [
164167
{ target: "lib.scriptHost.d.ts", sources: ["importcore.d.ts", "scriptHost.d.ts"], },
165168
{ target: "lib.d.ts", sources: ["core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], },
166169
{ target: "lib.core.es6.d.ts", sources: ["core.d.ts", "es6.d.ts"]},
167-
{ target: "lib.es6.d.ts", sources: ["core.d.ts", "es6.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] },
170+
{ target: "lib.es6.d.ts", sources: ["es6.d.ts", "core.d.ts", "intl.d.ts", "dom.generated.d.ts", "dom.es6.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"] }
168171
];
169172

170173
var libraryTargets = librarySourceMap.map(function (f) {
@@ -320,6 +323,8 @@ var processDiagnosticMessagesJs = path.join(scriptsDirectory, "processDiagnostic
320323
var processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnosticMessages.ts");
321324
var diagnosticMessagesJson = path.join(compilerDirectory, "diagnosticMessages.json");
322325
var diagnosticInfoMapTs = path.join(compilerDirectory, "diagnosticInformationMap.generated.ts");
326+
var generatedDiagnosticMessagesJSON = path.join(compilerDirectory, "diagnosticMessages.generated.json");
327+
var builtGeneratedDiagnosticMessagesJSON = path.join(builtLocalDirectory, "diagnosticMessages.generated.json");
323328

324329
file(processDiagnosticMessagesTs);
325330

@@ -348,6 +353,12 @@ file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson],
348353
ex.run();
349354
}, {async: true});
350355

356+
file(builtGeneratedDiagnosticMessagesJSON,[generatedDiagnosticMessagesJSON], function() {
357+
if (fs.existsSync(builtLocalDirectory)) {
358+
jake.cpR(generatedDiagnosticMessagesJSON, builtGeneratedDiagnosticMessagesJSON);
359+
}
360+
});
361+
351362
desc("Generates a diagnostic file in TypeScript based on an input JSON file");
352363
task("generate-diagnostics", [diagnosticInfoMapTs]);
353364

@@ -444,6 +455,8 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
444455
// Stanalone/web definition file using global 'ts' namespace
445456
jake.cpR(standaloneDefinitionsFile, nodeDefinitionsFile, {silent: true});
446457
var definitionFileContents = fs.readFileSync(nodeDefinitionsFile).toString();
458+
definitionFileContents = definitionFileContents.replace(/^(\s*)(export )?const enum (\S+) {(\s*)$/gm, '$1$2enum $3 {$4');
459+
fs.writeFileSync(standaloneDefinitionsFile, definitionFileContents);
447460

448461
// Official node package definition file, pointed to by 'typings' in package.json
449462
// Created by appending 'export = ts;' at the end of the standalone file to turn it into an external module
@@ -476,7 +489,7 @@ task("lssl", [lsslFile]);
476489

477490
// Local target to build the compiler and services
478491
desc("Builds the full compiler and services");
479-
task("local", ["generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile, serverFile]);
492+
task("local", ["generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile, serverFile, builtGeneratedDiagnosticMessagesJSON]);
480493

481494
// Local target to build only tsc.js
482495
desc("Builds only the compiler");
@@ -890,7 +903,9 @@ function lintFileAsync(options, path, cb) {
890903
});
891904
}
892905

893-
var lintTargets = compilerSources.concat(harnessCoreSources);
906+
var lintTargets = compilerSources
907+
.concat(harnessCoreSources)
908+
.concat(serverCoreSources);
894909

895910
desc("Runs tslint on the compiler sources");
896911
task("lint", ["build-rules"], function() {

lib/lib.core.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ interface ArrayBuffer {
12251225
interface ArrayBufferConstructor {
12261226
prototype: ArrayBuffer;
12271227
new (byteLength: number): ArrayBuffer;
1228-
isView(arg: any): boolean;
1228+
isView(arg: any): arg is ArrayBufferView;
12291229
}
12301230
declare var ArrayBuffer: ArrayBufferConstructor;
12311231

lib/lib.core.es6.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ interface ArrayBuffer {
12251225
interface ArrayBufferConstructor {
12261226
prototype: ArrayBuffer;
12271227
new (byteLength: number): ArrayBuffer;
1228-
isView(arg: any): boolean;
1228+
isView(arg: any): arg is ArrayBufferView;
12291229
}
12301230
declare var ArrayBuffer: ArrayBufferConstructor;
12311231

lib/lib.d.ts

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ interface ArrayBuffer {
12251225
interface ArrayBufferConstructor {
12261226
prototype: ArrayBuffer;
12271227
new (byteLength: number): ArrayBuffer;
1228-
isView(arg: any): boolean;
1228+
isView(arg: any): arg is ArrayBufferView;
12291229
}
12301230
declare var ArrayBuffer: ArrayBufferConstructor;
12311231

@@ -6234,6 +6234,68 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
62346234
createElement(tagName: "x-ms-webview"): MSHTMLWebViewElement;
62356235
createElement(tagName: "xmp"): HTMLBlockElement;
62366236
createElement(tagName: string): HTMLElement;
6237+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "a"): SVGAElement
6238+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "circle"): SVGCircleElement
6239+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "clipPath"): SVGClipPathElement
6240+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement
6241+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement
6242+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement
6243+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement
6244+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement
6245+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement
6246+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement
6247+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement
6248+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement
6249+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement
6250+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement
6251+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement
6252+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement
6253+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement
6254+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement
6255+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement
6256+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement
6257+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement
6258+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement
6259+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement
6260+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement
6261+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement
6262+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement
6263+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement
6264+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement
6265+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement
6266+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement
6267+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement
6268+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement
6269+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement
6270+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement
6271+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement
6272+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement
6273+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement
6274+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement
6275+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement
6276+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement
6277+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement
6278+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement
6279+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement
6280+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement
6281+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement
6282+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement
6283+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement
6284+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement
6285+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement
6286+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement
6287+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement
6288+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement
6289+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement
6290+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement
6291+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement
6292+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement
6293+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement
6294+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement
6295+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement
6296+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "use"): SVGUseElement
6297+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "view"): SVGViewElement
6298+
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement
62376299
createElementNS(namespaceURI: string, qualifiedName: string): Element;
62386300
createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
62396301
createNSResolver(nodeResolver: Node): XPathNSResolver;
@@ -11055,14 +11117,12 @@ interface ImageData {
1105511117
width: number;
1105611118
}
1105711119

11058-
interface ImageDataConstructor {
11120+
declare var ImageData: {
1105911121
prototype: ImageData;
1106011122
new(width: number, height: number): ImageData;
1106111123
new(array: Uint8ClampedArray, width: number, height: number): ImageData;
1106211124
}
1106311125

11064-
declare var ImageData: ImageDataConstructor;
11065-
1106611126
interface KeyboardEvent extends UIEvent {
1106711127
altKey: boolean;
1106811128
char: string;

0 commit comments

Comments
 (0)