mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-14 16:56:06 -05:00
Update LKG
This commit is contained in:
10
lib/tsc.js
10
lib/tsc.js
@@ -19016,10 +19016,12 @@ var ts;
|
||||
if (subsequentNode.kind === node.kind) {
|
||||
var errorNode_1 = subsequentNode.name || subsequentNode;
|
||||
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
|
||||
ts.Debug.assert(node.kind === 143 || node.kind === 142);
|
||||
ts.Debug.assert((node.flags & 128) !== (subsequentNode.flags & 128));
|
||||
var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
|
||||
error(errorNode_1, diagnostic);
|
||||
var reportError = (node.kind === 143 || node.kind === 142) &&
|
||||
(node.flags & 128) !== (subsequentNode.flags & 128);
|
||||
if (reportError) {
|
||||
var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
|
||||
error(errorNode_1, diagnostic);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (ts.nodeIsPresent(subsequentNode.body)) {
|
||||
|
||||
@@ -19479,10 +19479,12 @@ var ts;
|
||||
if (subsequentNode.kind === node.kind) {
|
||||
var errorNode_1 = subsequentNode.name || subsequentNode;
|
||||
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
|
||||
ts.Debug.assert(node.kind === 143 || node.kind === 142);
|
||||
ts.Debug.assert((node.flags & 128) !== (subsequentNode.flags & 128));
|
||||
var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
|
||||
error(errorNode_1, diagnostic);
|
||||
var reportError = (node.kind === 143 || node.kind === 142) &&
|
||||
(node.flags & 128) !== (subsequentNode.flags & 128);
|
||||
if (reportError) {
|
||||
var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
|
||||
error(errorNode_1, diagnostic);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (ts.nodeIsPresent(subsequentNode.body)) {
|
||||
@@ -41443,7 +41445,7 @@ var ts;
|
||||
},
|
||||
_a[CommandNames.Open] = function (request) {
|
||||
var openArgs = request.arguments;
|
||||
_this.openClientFile(openArgs.file);
|
||||
_this.openClientFile(openArgs.file, openArgs.fileContent);
|
||||
return { responseRequired: false };
|
||||
},
|
||||
_a[CommandNames.Quickinfo] = function (request) {
|
||||
@@ -41876,9 +41878,9 @@ var ts;
|
||||
symbolDisplayString: displayString
|
||||
};
|
||||
};
|
||||
Session.prototype.openClientFile = function (fileName) {
|
||||
Session.prototype.openClientFile = function (fileName, fileContent) {
|
||||
var file = ts.normalizePath(fileName);
|
||||
this.projectService.openClientFile(file);
|
||||
this.projectService.openClientFile(file, fileContent);
|
||||
};
|
||||
Session.prototype.getQuickInfo = function (line, offset, fileName) {
|
||||
var file = ts.normalizePath(fileName);
|
||||
@@ -43031,14 +43033,14 @@ var ts;
|
||||
filename = ts.normalizePath(filename);
|
||||
return ts.lookUp(this.filenameToScriptInfo, filename);
|
||||
};
|
||||
ProjectService.prototype.openFile = function (fileName, openedByClient) {
|
||||
ProjectService.prototype.openFile = function (fileName, openedByClient, fileContent) {
|
||||
var _this = this;
|
||||
fileName = ts.normalizePath(fileName);
|
||||
var info = ts.lookUp(this.filenameToScriptInfo, fileName);
|
||||
if (!info) {
|
||||
var content;
|
||||
if (this.host.fileExists(fileName)) {
|
||||
content = this.host.readFile(fileName);
|
||||
content = fileContent || this.host.readFile(fileName);
|
||||
}
|
||||
if (!content) {
|
||||
if (openedByClient) {
|
||||
@@ -43056,6 +43058,9 @@ var ts;
|
||||
}
|
||||
}
|
||||
if (info) {
|
||||
if (fileContent) {
|
||||
info.svc.reload(fileContent);
|
||||
}
|
||||
if (openedByClient) {
|
||||
info.isOpen = true;
|
||||
}
|
||||
@@ -43076,9 +43081,9 @@ var ts;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
ProjectService.prototype.openClientFile = function (fileName) {
|
||||
ProjectService.prototype.openClientFile = function (fileName, fileContent) {
|
||||
this.openOrUpdateConfiguredProjectForFile(fileName);
|
||||
var info = this.openFile(fileName, true);
|
||||
var info = this.openFile(fileName, true, fileContent);
|
||||
this.addOpenFile(info);
|
||||
this.printProjects();
|
||||
return info;
|
||||
|
||||
@@ -23384,11 +23384,16 @@ var ts;
|
||||
var errorNode_1 = subsequentNode.name || subsequentNode;
|
||||
// TODO(jfreeman): These are methods, so handle computed name case
|
||||
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
|
||||
// the only situation when this is possible (same kind\same name but different symbol) - mixed static and instance class members
|
||||
ts.Debug.assert(node.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */);
|
||||
ts.Debug.assert((node.flags & 128 /* Static */) !== (subsequentNode.flags & 128 /* Static */));
|
||||
var diagnostic = node.flags & 128 /* Static */ ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
|
||||
error(errorNode_1, diagnostic);
|
||||
var reportError = (node.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */) &&
|
||||
(node.flags & 128 /* Static */) !== (subsequentNode.flags & 128 /* Static */);
|
||||
// we can get here in two cases
|
||||
// 1. mixed static and instance class members
|
||||
// 2. something with the same name was defined before the set of overloads that prevents them from merging
|
||||
// here we'll report error only for the first case since for second we should already report error in binder
|
||||
if (reportError) {
|
||||
var diagnostic = node.flags & 128 /* Static */ ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
|
||||
error(errorNode_1, diagnostic);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (ts.nodeIsPresent(subsequentNode.body)) {
|
||||
|
||||
@@ -23384,11 +23384,16 @@ var ts;
|
||||
var errorNode_1 = subsequentNode.name || subsequentNode;
|
||||
// TODO(jfreeman): These are methods, so handle computed name case
|
||||
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
|
||||
// the only situation when this is possible (same kind\same name but different symbol) - mixed static and instance class members
|
||||
ts.Debug.assert(node.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */);
|
||||
ts.Debug.assert((node.flags & 128 /* Static */) !== (subsequentNode.flags & 128 /* Static */));
|
||||
var diagnostic = node.flags & 128 /* Static */ ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
|
||||
error(errorNode_1, diagnostic);
|
||||
var reportError = (node.kind === 143 /* MethodDeclaration */ || node.kind === 142 /* MethodSignature */) &&
|
||||
(node.flags & 128 /* Static */) !== (subsequentNode.flags & 128 /* Static */);
|
||||
// we can get here in two cases
|
||||
// 1. mixed static and instance class members
|
||||
// 2. something with the same name was defined before the set of overloads that prevents them from merging
|
||||
// here we'll report error only for the first case since for second we should already report error in binder
|
||||
if (reportError) {
|
||||
var diagnostic = node.flags & 128 /* Static */ ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
|
||||
error(errorNode_1, diagnostic);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (ts.nodeIsPresent(subsequentNode.body)) {
|
||||
|
||||
Reference in New Issue
Block a user