Skip to content

Commit d75f5b0

Browse files
committed
Merge pull request #410 from zhengbli/updateTo17Release
Update tsserver to 1.7 release version
2 parents 350b6a0 + 32e9c42 commit d75f5b0

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

tsserver/tsc.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19016,10 +19016,12 @@ var ts;
1901619016
if (subsequentNode.kind === node.kind) {
1901719017
var errorNode_1 = subsequentNode.name || subsequentNode;
1901819018
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
19019-
ts.Debug.assert(node.kind === 143 || node.kind === 142);
19020-
ts.Debug.assert((node.flags & 128) !== (subsequentNode.flags & 128));
19021-
var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
19022-
error(errorNode_1, diagnostic);
19019+
var reportError = (node.kind === 143 || node.kind === 142) &&
19020+
(node.flags & 128) !== (subsequentNode.flags & 128);
19021+
if (reportError) {
19022+
var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
19023+
error(errorNode_1, diagnostic);
19024+
}
1902319025
return;
1902419026
}
1902519027
else if (ts.nodeIsPresent(subsequentNode.body)) {
@@ -29871,7 +29873,7 @@ var ts;
2987129873
ts.ioReadTime = 0;
2987229874
ts.ioWriteTime = 0;
2987329875
var emptyArray = [];
29874-
ts.version = "1.7.2";
29876+
ts.version = "1.7.3";
2987529877
function findConfigFile(searchPath) {
2987629878
var fileName = "tsconfig.json";
2987729879
while (true) {

tsserver/tsserver.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19479,10 +19479,12 @@ var ts;
1947919479
if (subsequentNode.kind === node.kind) {
1948019480
var errorNode_1 = subsequentNode.name || subsequentNode;
1948119481
if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) {
19482-
ts.Debug.assert(node.kind === 143 || node.kind === 142);
19483-
ts.Debug.assert((node.flags & 128) !== (subsequentNode.flags & 128));
19484-
var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
19485-
error(errorNode_1, diagnostic);
19482+
var reportError = (node.kind === 143 || node.kind === 142) &&
19483+
(node.flags & 128) !== (subsequentNode.flags & 128);
19484+
if (reportError) {
19485+
var diagnostic = node.flags & 128 ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
19486+
error(errorNode_1, diagnostic);
19487+
}
1948619488
return;
1948719489
}
1948819490
else if (ts.nodeIsPresent(subsequentNode.body)) {
@@ -30334,7 +30336,7 @@ var ts;
3033430336
ts.ioReadTime = 0;
3033530337
ts.ioWriteTime = 0;
3033630338
var emptyArray = [];
30337-
ts.version = "1.7.2";
30339+
ts.version = "1.7.3";
3033830340
function findConfigFile(searchPath) {
3033930341
var fileName = "tsconfig.json";
3034030342
while (true) {
@@ -41443,7 +41445,7 @@ var ts;
4144341445
},
4144441446
_a[CommandNames.Open] = function (request) {
4144541447
var openArgs = request.arguments;
41446-
_this.openClientFile(openArgs.file);
41448+
_this.openClientFile(openArgs.file, openArgs.fileContent);
4144741449
return { responseRequired: false };
4144841450
},
4144941451
_a[CommandNames.Quickinfo] = function (request) {
@@ -41876,9 +41878,9 @@ var ts;
4187641878
symbolDisplayString: displayString
4187741879
};
4187841880
};
41879-
Session.prototype.openClientFile = function (fileName) {
41881+
Session.prototype.openClientFile = function (fileName, fileContent) {
4188041882
var file = ts.normalizePath(fileName);
41881-
this.projectService.openClientFile(file);
41883+
this.projectService.openClientFile(file, fileContent);
4188241884
};
4188341885
Session.prototype.getQuickInfo = function (line, offset, fileName) {
4188441886
var file = ts.normalizePath(fileName);
@@ -43031,14 +43033,14 @@ var ts;
4303143033
filename = ts.normalizePath(filename);
4303243034
return ts.lookUp(this.filenameToScriptInfo, filename);
4303343035
};
43034-
ProjectService.prototype.openFile = function (fileName, openedByClient) {
43036+
ProjectService.prototype.openFile = function (fileName, openedByClient, fileContent) {
4303543037
var _this = this;
4303643038
fileName = ts.normalizePath(fileName);
4303743039
var info = ts.lookUp(this.filenameToScriptInfo, fileName);
4303843040
if (!info) {
4303943041
var content;
4304043042
if (this.host.fileExists(fileName)) {
43041-
content = this.host.readFile(fileName);
43043+
content = fileContent || this.host.readFile(fileName);
4304243044
}
4304343045
if (!content) {
4304443046
if (openedByClient) {
@@ -43056,6 +43058,9 @@ var ts;
4305643058
}
4305743059
}
4305843060
if (info) {
43061+
if (fileContent) {
43062+
info.svc.reload(fileContent);
43063+
}
4305943064
if (openedByClient) {
4306043065
info.isOpen = true;
4306143066
}
@@ -43076,9 +43081,9 @@ var ts;
4307643081
}
4307743082
return undefined;
4307843083
};
43079-
ProjectService.prototype.openClientFile = function (fileName) {
43084+
ProjectService.prototype.openClientFile = function (fileName, fileContent) {
4308043085
this.openOrUpdateConfiguredProjectForFile(fileName);
43081-
var info = this.openFile(fileName, true);
43086+
var info = this.openFile(fileName, true, fileContent);
4308243087
this.addOpenFile(info);
4308343088
this.printProjects();
4308443089
return info;

0 commit comments

Comments
 (0)