Skip to content

Commit 3f11c0b

Browse files
committed
merge with master
2 parents d2a11b5 + 067e1cc commit 3f11c0b

Some content is hidden

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

48 files changed

+10539
-8032
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: 19 additions & 5 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",
@@ -164,7 +166,7 @@ var librarySourceMap = [
164166
{ target: "lib.scriptHost.d.ts", sources: ["importcore.d.ts", "scriptHost.d.ts"], },
165167
{ target: "lib.d.ts", sources: ["core.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], },
166168
{ 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"] },
169+
{ 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"] }
168170
];
169171

170172
var libraryTargets = librarySourceMap.map(function (f) {
@@ -320,6 +322,8 @@ var processDiagnosticMessagesJs = path.join(scriptsDirectory, "processDiagnostic
320322
var processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnosticMessages.ts");
321323
var diagnosticMessagesJson = path.join(compilerDirectory, "diagnosticMessages.json");
322324
var diagnosticInfoMapTs = path.join(compilerDirectory, "diagnosticInformationMap.generated.ts");
325+
var generatedDiagnosticMessagesJSON = path.join(compilerDirectory, "diagnosticMessages.generated.json");
326+
var builtGeneratedDiagnosticMessagesJSON = path.join(builtLocalDirectory, "diagnosticMessages.generated.json");
323327

324328
file(processDiagnosticMessagesTs);
325329

@@ -348,6 +352,12 @@ file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson],
348352
ex.run();
349353
}, {async: true});
350354

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

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

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

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

481493
// Local target to build only tsc.js
482494
desc("Builds only the compiler");
@@ -890,7 +902,9 @@ function lintFileAsync(options, path, cb) {
890902
});
891903
}
892904

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

895909
desc("Runs tslint on the compiler sources");
896910
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)