Skip to content

Commit eb9c48e

Browse files
author
Yui T
committed
Update LKG
1 parent c85fcca commit eb9c48e

2 files changed

Lines changed: 59 additions & 70 deletions

File tree

bin/tsc.js

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2806,13 +2806,12 @@ var ts;
28062806
if (matchResult) {
28072807
var start = commentRange.pos;
28082808
var end = commentRange.end;
2809-
var fileRef = {
2810-
pos: start,
2811-
end: end,
2812-
filename: matchResult[3]
2813-
};
28142809
return {
2815-
fileReference: fileRef,
2810+
fileReference: {
2811+
pos: start,
2812+
end: end,
2813+
filename: matchResult[3]
2814+
},
28162815
isNoDefaultLib: false
28172816
};
28182817
}
@@ -9063,25 +9062,25 @@ var ts;
90639062
diagnostics.sort(ts.compareDiagnostics);
90649063
diagnostics = ts.deduplicateSortedDiagnostics(diagnostics);
90659064
var hasEmitterError = ts.forEach(diagnostics, function (diagnostic) { return diagnostic.category === 1 /* Error */; });
9066-
var returnCode;
9065+
var emitResultStatus;
90679066
if (isEmitBlocked) {
9068-
returnCode = 1 /* AllOutputGenerationSkipped */;
9067+
emitResultStatus = 1 /* AllOutputGenerationSkipped */;
90699068
}
90709069
else if (hasEmitterError) {
9071-
returnCode = 4 /* EmitErrorsEncountered */;
9070+
emitResultStatus = 4 /* EmitErrorsEncountered */;
90729071
}
90739072
else if (hasSemanticErrors && compilerOptions.declaration) {
9074-
returnCode = 3 /* DeclarationGenerationSkipped */;
9073+
emitResultStatus = 3 /* DeclarationGenerationSkipped */;
90759074
}
90769075
else if (hasSemanticErrors && !compilerOptions.declaration) {
9077-
returnCode = 2 /* JSGeneratedWithSemanticErrors */;
9076+
emitResultStatus = 2 /* JSGeneratedWithSemanticErrors */;
90789077
}
90799078
else {
9080-
returnCode = 0 /* Succeeded */;
9079+
emitResultStatus = 0 /* Succeeded */;
90819080
}
90829081
return {
9083-
emitResultStatus: returnCode,
9084-
errors: diagnostics,
9082+
emitResultStatus: emitResultStatus,
9083+
diagnostics: diagnostics,
90859084
sourceMaps: sourceMapDataList
90869085
};
90879086
}
@@ -9140,14 +9139,16 @@ var ts;
91409139
var compilerOptions = program.getCompilerOptions();
91419140
var checker = {
91429141
getProgram: function () { return program; },
9143-
getDiagnostics: getDiagnostics,
9144-
getGlobalDiagnostics: getGlobalDiagnostics,
91459142
getNodeCount: function () { return ts.sum(program.getSourceFiles(), "nodeCount"); },
91469143
getIdentifierCount: function () { return ts.sum(program.getSourceFiles(), "identifierCount"); },
91479144
getSymbolCount: function () { return ts.sum(program.getSourceFiles(), "symbolCount"); },
91489145
getTypeCount: function () { return typeCount; },
9146+
isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
9147+
isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
9148+
getDiagnostics: getDiagnostics,
9149+
getGlobalDiagnostics: getGlobalDiagnostics,
91499150
checkProgram: checkProgram,
9150-
emitFiles: invokeEmitter,
9151+
invokeEmitter: invokeEmitter,
91519152
getParentOfSymbol: getParentOfSymbol,
91529153
getNarrowedTypeOfSymbol: getNarrowedTypeOfSymbol,
91539154
getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol,
@@ -9173,8 +9174,6 @@ var ts;
91739174
getSignatureFromDeclaration: getSignatureFromDeclaration,
91749175
isImplementationOfOverload: isImplementationOfOverload,
91759176
getAliasedSymbol: resolveImport,
9176-
isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
9177-
isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
91789177
hasEarlyErrors: hasEarlyErrors,
91799178
isEmitBlocked: isEmitBlocked
91809179
};
@@ -16864,8 +16863,8 @@ var ts;
1686416863
}
1686516864
else {
1686616865
var emitStart = new Date().getTime();
16867-
var emitOutput = checker.emitFiles();
16868-
var emitErrors = emitOutput.errors;
16866+
var emitOutput = checker.invokeEmitter();
16867+
var emitErrors = emitOutput.diagnostics;
1686916868
exitStatus = emitOutput.emitResultStatus;
1687016869
var reportStart = new Date().getTime();
1687116870
errors = ts.concatenate(errors, emitErrors);

bin/typescriptServices.js

Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,13 +2611,12 @@ var ts;
26112611
if (matchResult) {
26122612
var start = commentRange.pos;
26132613
var end = commentRange.end;
2614-
var fileRef = {
2615-
pos: start,
2616-
end: end,
2617-
filename: matchResult[3]
2618-
};
26192614
return {
2620-
fileReference: fileRef,
2615+
fileReference: {
2616+
pos: start,
2617+
end: end,
2618+
filename: matchResult[3]
2619+
},
26212620
isNoDefaultLib: false
26222621
};
26232622
}
@@ -8868,25 +8867,25 @@ var ts;
88688867
diagnostics.sort(ts.compareDiagnostics);
88698868
diagnostics = ts.deduplicateSortedDiagnostics(diagnostics);
88708869
var hasEmitterError = ts.forEach(diagnostics, function (diagnostic) { return diagnostic.category === 1 /* Error */; });
8871-
var returnCode;
8870+
var emitResultStatus;
88728871
if (isEmitBlocked) {
8873-
returnCode = 1 /* AllOutputGenerationSkipped */;
8872+
emitResultStatus = 1 /* AllOutputGenerationSkipped */;
88748873
}
88758874
else if (hasEmitterError) {
8876-
returnCode = 4 /* EmitErrorsEncountered */;
8875+
emitResultStatus = 4 /* EmitErrorsEncountered */;
88778876
}
88788877
else if (hasSemanticErrors && compilerOptions.declaration) {
8879-
returnCode = 3 /* DeclarationGenerationSkipped */;
8878+
emitResultStatus = 3 /* DeclarationGenerationSkipped */;
88808879
}
88818880
else if (hasSemanticErrors && !compilerOptions.declaration) {
8882-
returnCode = 2 /* JSGeneratedWithSemanticErrors */;
8881+
emitResultStatus = 2 /* JSGeneratedWithSemanticErrors */;
88838882
}
88848883
else {
8885-
returnCode = 0 /* Succeeded */;
8884+
emitResultStatus = 0 /* Succeeded */;
88868885
}
88878886
return {
8888-
emitResultStatus: returnCode,
8889-
errors: diagnostics,
8887+
emitResultStatus: emitResultStatus,
8888+
diagnostics: diagnostics,
88908889
sourceMaps: sourceMapDataList
88918890
};
88928891
}
@@ -8945,14 +8944,16 @@ var ts;
89458944
var compilerOptions = program.getCompilerOptions();
89468945
var checker = {
89478946
getProgram: function () { return program; },
8948-
getDiagnostics: getDiagnostics,
8949-
getGlobalDiagnostics: getGlobalDiagnostics,
89508947
getNodeCount: function () { return ts.sum(program.getSourceFiles(), "nodeCount"); },
89518948
getIdentifierCount: function () { return ts.sum(program.getSourceFiles(), "identifierCount"); },
89528949
getSymbolCount: function () { return ts.sum(program.getSourceFiles(), "symbolCount"); },
89538950
getTypeCount: function () { return typeCount; },
8951+
isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
8952+
isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
8953+
getDiagnostics: getDiagnostics,
8954+
getGlobalDiagnostics: getGlobalDiagnostics,
89548955
checkProgram: checkProgram,
8955-
emitFiles: invokeEmitter,
8956+
invokeEmitter: invokeEmitter,
89568957
getParentOfSymbol: getParentOfSymbol,
89578958
getNarrowedTypeOfSymbol: getNarrowedTypeOfSymbol,
89588959
getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol,
@@ -8978,8 +8979,6 @@ var ts;
89788979
getSignatureFromDeclaration: getSignatureFromDeclaration,
89798980
isImplementationOfOverload: isImplementationOfOverload,
89808981
getAliasedSymbol: resolveImport,
8981-
isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; },
8982-
isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; },
89838982
hasEarlyErrors: hasEarlyErrors,
89848983
isEmitBlocked: isEmitBlocked
89858984
};
@@ -16739,33 +16738,33 @@ var ts;
1673916738
var callTargetDisplayParts = callTargetSymbol && ts.symbolToDisplayParts(typeInfoResolver, callTargetSymbol, undefined, undefined);
1674016739
var items = ts.map(candidates, function (candidateSignature) {
1674116740
var signatureHelpParameters;
16742-
var prefixParts = [];
16743-
var suffixParts = [];
16741+
var prefixDisplayParts = [];
16742+
var suffixDisplayParts = [];
1674416743
if (callTargetDisplayParts) {
16745-
prefixParts.push.apply(prefixParts, callTargetDisplayParts);
16744+
prefixDisplayParts.push.apply(prefixDisplayParts, callTargetDisplayParts);
1674616745
}
1674716746
if (isTypeParameterHelp) {
16748-
prefixParts.push(ts.punctuationPart(23 /* LessThanToken */));
16747+
prefixDisplayParts.push(ts.punctuationPart(23 /* LessThanToken */));
1674916748
var typeParameters = candidateSignature.typeParameters;
1675016749
signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray;
16751-
suffixParts.push(ts.punctuationPart(24 /* GreaterThanToken */));
16750+
suffixDisplayParts.push(ts.punctuationPart(24 /* GreaterThanToken */));
1675216751
var parameterParts = ts.mapToDisplayParts(function (writer) { return typeInfoResolver.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.parameters, writer, argumentListOrTypeArgumentList); });
16753-
suffixParts.push.apply(suffixParts, parameterParts);
16752+
suffixDisplayParts.push.apply(suffixDisplayParts, parameterParts);
1675416753
}
1675516754
else {
1675616755
var typeParameterParts = ts.mapToDisplayParts(function (writer) { return typeInfoResolver.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, argumentListOrTypeArgumentList); });
16757-
prefixParts.push.apply(prefixParts, typeParameterParts);
16758-
prefixParts.push(ts.punctuationPart(15 /* OpenParenToken */));
16756+
prefixDisplayParts.push.apply(prefixDisplayParts, typeParameterParts);
16757+
prefixDisplayParts.push(ts.punctuationPart(15 /* OpenParenToken */));
1675916758
var parameters = candidateSignature.parameters;
1676016759
signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray;
16761-
suffixParts.push(ts.punctuationPart(16 /* CloseParenToken */));
16760+
suffixDisplayParts.push(ts.punctuationPart(16 /* CloseParenToken */));
1676216761
}
1676316762
var returnTypeParts = ts.mapToDisplayParts(function (writer) { return typeInfoResolver.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, argumentListOrTypeArgumentList); });
16764-
suffixParts.push.apply(suffixParts, returnTypeParts);
16763+
suffixDisplayParts.push.apply(suffixDisplayParts, returnTypeParts);
1676516764
return {
1676616765
isVariadic: candidateSignature.hasRestParameter,
16767-
prefixDisplayParts: prefixParts,
16768-
suffixDisplayParts: suffixParts,
16766+
prefixDisplayParts: prefixDisplayParts,
16767+
suffixDisplayParts: suffixDisplayParts,
1676916768
separatorDisplayParts: [ts.punctuationPart(22 /* CommaToken */), ts.spacePart()],
1677016769
parameters: signatureHelpParameters,
1677116770
documentation: candidateSignature.getDocumentationComment()
@@ -16865,15 +16864,15 @@ var ts;
1686516864
}
1686616865
ts.startEndOverlapsWithStartEnd = startEndOverlapsWithStartEnd;
1686716866
function findListItemInfo(node) {
16868-
var syntaxList = findContainingList(node);
16869-
if (!syntaxList) {
16867+
var list = findContainingList(node);
16868+
if (!list) {
1687016869
return undefined;
1687116870
}
16872-
var children = syntaxList.getChildren();
16873-
var index = ts.indexOf(children, node);
16871+
var children = list.getChildren();
16872+
var listItemIndex = ts.indexOf(children, node);
1687416873
return {
16875-
listItemIndex: index,
16876-
list: syntaxList
16874+
listItemIndex: listItemIndex,
16875+
list: list
1687716876
};
1687816877
}
1687916878
ts.findListItemInfo = findListItemInfo;
@@ -20503,7 +20502,7 @@ var ts;
2050320502
var savedWriter = writer;
2050420503
writer = function (filename, data, writeByteOrderMark) {
2050520504
};
20506-
allDiagnostics = allDiagnostics.concat(checker.emitFiles(targetSourceFile).errors);
20505+
allDiagnostics = allDiagnostics.concat(checker.invokeEmitter(targetSourceFile).diagnostics);
2050720506
writer = savedWriter;
2050820507
}
2050920508
return allDiagnostics;
@@ -22267,7 +22266,7 @@ var ts;
2226722266
writer = undefined;
2226822267
return emitOutput;
2226922268
}
22270-
var emitFilesResult = getFullTypeCheckChecker().emitFiles(targetSourceFile);
22269+
var emitFilesResult = getFullTypeCheckChecker().invokeEmitter(targetSourceFile);
2227122270
emitOutput.emitOutputStatus = emitFilesResult.emitResultStatus;
2227222271
writer = undefined;
2227322272
return emitOutput;
@@ -22829,7 +22828,6 @@ var ts;
2282922828
getDefinitionAtPosition: getDefinitionAtPosition,
2283022829
getReferencesAtPosition: getReferencesAtPosition,
2283122830
getOccurrencesAtPosition: getOccurrencesAtPosition,
22832-
getImplementorsAtPosition: function (filename, position) { return []; },
2283322831
getNameOrDottedNameSpan: getNameOrDottedNameSpan,
2283422832
getBreakpointStatementAtPosition: getBreakpointStatementAtPosition,
2283522833
getNavigateToItems: getNavigateToItems,
@@ -23049,9 +23047,7 @@ var ts;
2304923047
return 5 /* Identifier */;
2305023048
}
2305123049
}
23052-
return {
23053-
getClassificationsForLine: getClassificationsForLine
23054-
};
23050+
return { getClassificationsForLine: getClassificationsForLine };
2305523051
}
2305623052
ts.createClassifier = createClassifier;
2305723053
function initializeServices() {
@@ -23774,12 +23770,6 @@ var ts;
2377423770
return _this.languageService.getOccurrencesAtPosition(fileName, position);
2377523771
});
2377623772
};
23777-
LanguageServiceShimObject.prototype.getImplementorsAtPosition = function (fileName, position) {
23778-
var _this = this;
23779-
return this.forwardJSONCall("getImplementorsAtPosition('" + fileName + "', " + position + ")", function () {
23780-
return _this.languageService.getImplementorsAtPosition(fileName, position);
23781-
});
23782-
};
2378323773
LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position, isMemberCompletion) {
2378423774
var _this = this;
2378523775
return this.forwardJSONCall("getCompletionsAtPosition('" + fileName + "', " + position + ", " + isMemberCompletion + ")", function () {

0 commit comments

Comments
 (0)