Skip to content

Commit

Permalink
Update LKG.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed Jan 3, 2019
1 parent 476d46b commit e7a0f7e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 212 deletions.
2 changes: 1 addition & 1 deletion lib/tsc.js
Expand Up @@ -61,7 +61,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
var ts;
(function (ts) {
ts.versionMajorMinor = "3.2";
ts.version = ts.versionMajorMinor + ".3";
ts.version = ts.versionMajorMinor + ".4";
})(ts || (ts = {}));
(function (ts) {
ts.emptyArray = [];
Expand Down
4 changes: 2 additions & 2 deletions lib/tsserver.js
Expand Up @@ -88,7 +88,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".3";
ts.version = ts.versionMajorMinor + ".4";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
Expand Down Expand Up @@ -122606,7 +122606,7 @@ var ts;
ProjectService.prototype.setConfigFileExistenceByNewConfiguredProject = function (project) {
var configFileExistenceInfo = this.getConfigFileExistenceInfo(project);
if (configFileExistenceInfo) {
ts.Debug.assert(configFileExistenceInfo.exists);
configFileExistenceInfo.exists = true;
if (configFileExistenceInfo.configFileWatcherForRootOfInferredProject) {
var configFileName = project.getConfigFilePath();
configFileExistenceInfo.configFileWatcherForRootOfInferredProject.close();
Expand Down
73 changes: 3 additions & 70 deletions lib/tsserverlibrary.js
Expand Up @@ -84,7 +84,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".3";
ts.version = ts.versionMajorMinor + ".4";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
Expand Down Expand Up @@ -109075,40 +109075,6 @@ var ts;
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
var fixId = "addNameToNamelessParameter";
var errorCodes = [ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];
codefix.registerCodeFix({
errorCodes: errorCodes,
getCodeActions: function (context) {
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_parameter_name, fixId, ts.Diagnostics.Add_names_to_all_parameters_without_names)];
},
fixIds: [fixId],
getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return makeChange(changes, diag.file, diag.start); }); },
});
function makeChange(changeTracker, sourceFile, pos) {
var token = ts.getTokenAtPosition(sourceFile, pos);
if (!ts.isIdentifier(token)) {
return ts.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a " + ts.formatSyntaxKind(token.kind));
}
var param = token.parent;
if (!ts.isParameter(param)) {
return ts.Debug.fail("Tried to add a parameter name to a non-parameter: " + ts.formatSyntaxKind(token.kind));
}
var i = param.parent.parameters.indexOf(param);
ts.Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one.");
ts.Debug.assert(i > -1, "Parameter not found in parent parameter list.");
var replacement = ts.createParameter(
/*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, ts.createTypeReferenceNode(token, /*typeArguments*/ undefined), param.initializer);
changeTracker.replaceNode(sourceFile, token, replacement);
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
Expand Down Expand Up @@ -112125,40 +112091,6 @@ var ts;
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
var fixId = "addMissingNewOperator";
var errorCodes = [ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];
codefix.registerCodeFix({
errorCodes: errorCodes,
getCodeActions: function (context) {
var sourceFile = context.sourceFile, span = context.span;
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingNewOperator(t, sourceFile, span); });
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_missing_new_operator_to_call, fixId, ts.Diagnostics.Add_missing_new_operator_to_all_calls)];
},
fixIds: [fixId],
getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
return addMissingNewOperator(changes, context.sourceFile, diag);
}); },
});
function addMissingNewOperator(changes, sourceFile, span) {
var call = ts.cast(findAncestorMatchingSpan(sourceFile, span), ts.isCallExpression);
var newExpression = ts.createNew(call.expression, call.typeArguments, call.arguments);
changes.replaceNode(sourceFile, call, newExpression);
}
function findAncestorMatchingSpan(sourceFile, span) {
var token = ts.getTokenAtPosition(sourceFile, span.start);
var end = ts.textSpanEnd(span);
while (token.end < end) {
token = token.parent;
}
return token;
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
Expand Down Expand Up @@ -123047,7 +122979,8 @@ var ts;
ProjectService.prototype.setConfigFileExistenceByNewConfiguredProject = function (project) {
var configFileExistenceInfo = this.getConfigFileExistenceInfo(project);
if (configFileExistenceInfo) {
ts.Debug.assert(configFileExistenceInfo.exists);
// The existance might not be set if the file watcher is not invoked by the time config project is created by external project
configFileExistenceInfo.exists = true;
// close existing watcher
if (configFileExistenceInfo.configFileWatcherForRootOfInferredProject) {
var configFileName = project.getConfigFilePath();
Expand Down
70 changes: 1 addition & 69 deletions lib/typescript.js
Expand Up @@ -75,7 +75,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".3";
ts.version = ts.versionMajorMinor + ".4";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
Expand Down Expand Up @@ -109066,40 +109066,6 @@ var ts;
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
var fixId = "addNameToNamelessParameter";
var errorCodes = [ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];
codefix.registerCodeFix({
errorCodes: errorCodes,
getCodeActions: function (context) {
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_parameter_name, fixId, ts.Diagnostics.Add_names_to_all_parameters_without_names)];
},
fixIds: [fixId],
getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return makeChange(changes, diag.file, diag.start); }); },
});
function makeChange(changeTracker, sourceFile, pos) {
var token = ts.getTokenAtPosition(sourceFile, pos);
if (!ts.isIdentifier(token)) {
return ts.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a " + ts.formatSyntaxKind(token.kind));
}
var param = token.parent;
if (!ts.isParameter(param)) {
return ts.Debug.fail("Tried to add a parameter name to a non-parameter: " + ts.formatSyntaxKind(token.kind));
}
var i = param.parent.parameters.indexOf(param);
ts.Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one.");
ts.Debug.assert(i > -1, "Parameter not found in parent parameter list.");
var replacement = ts.createParameter(
/*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, ts.createTypeReferenceNode(token, /*typeArguments*/ undefined), param.initializer);
changeTracker.replaceNode(sourceFile, token, replacement);
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
Expand Down Expand Up @@ -112116,40 +112082,6 @@ var ts;
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
var fixId = "addMissingNewOperator";
var errorCodes = [ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];
codefix.registerCodeFix({
errorCodes: errorCodes,
getCodeActions: function (context) {
var sourceFile = context.sourceFile, span = context.span;
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingNewOperator(t, sourceFile, span); });
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_missing_new_operator_to_call, fixId, ts.Diagnostics.Add_missing_new_operator_to_all_calls)];
},
fixIds: [fixId],
getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
return addMissingNewOperator(changes, context.sourceFile, diag);
}); },
});
function addMissingNewOperator(changes, sourceFile, span) {
var call = ts.cast(findAncestorMatchingSpan(sourceFile, span), ts.isCallExpression);
var newExpression = ts.createNew(call.expression, call.typeArguments, call.arguments);
changes.replaceNode(sourceFile, call, newExpression);
}
function findAncestorMatchingSpan(sourceFile, span) {
var token = ts.getTokenAtPosition(sourceFile, span.start);
var end = ts.textSpanEnd(span);
while (token.end < end) {
token = token.parent;
}
return token;
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
Expand Down
70 changes: 1 addition & 69 deletions lib/typescriptServices.js
Expand Up @@ -75,7 +75,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".3";
ts.version = ts.versionMajorMinor + ".4";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
Expand Down Expand Up @@ -109066,40 +109066,6 @@ var ts;
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
var fixId = "addNameToNamelessParameter";
var errorCodes = [ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];
codefix.registerCodeFix({
errorCodes: errorCodes,
getCodeActions: function (context) {
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_parameter_name, fixId, ts.Diagnostics.Add_names_to_all_parameters_without_names)];
},
fixIds: [fixId],
getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) { return makeChange(changes, diag.file, diag.start); }); },
});
function makeChange(changeTracker, sourceFile, pos) {
var token = ts.getTokenAtPosition(sourceFile, pos);
if (!ts.isIdentifier(token)) {
return ts.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a " + ts.formatSyntaxKind(token.kind));
}
var param = token.parent;
if (!ts.isParameter(param)) {
return ts.Debug.fail("Tried to add a parameter name to a non-parameter: " + ts.formatSyntaxKind(token.kind));
}
var i = param.parent.parameters.indexOf(param);
ts.Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one.");
ts.Debug.assert(i > -1, "Parameter not found in parent parameter list.");
var replacement = ts.createParameter(
/*decorators*/ undefined, param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, ts.createTypeReferenceNode(token, /*typeArguments*/ undefined), param.initializer);
changeTracker.replaceNode(sourceFile, token, replacement);
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
Expand Down Expand Up @@ -112116,40 +112082,6 @@ var ts;
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
var fixId = "addMissingNewOperator";
var errorCodes = [ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];
codefix.registerCodeFix({
errorCodes: errorCodes,
getCodeActions: function (context) {
var sourceFile = context.sourceFile, span = context.span;
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return addMissingNewOperator(t, sourceFile, span); });
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_missing_new_operator_to_call, fixId, ts.Diagnostics.Add_missing_new_operator_to_all_calls)];
},
fixIds: [fixId],
getAllCodeActions: function (context) { return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
return addMissingNewOperator(changes, context.sourceFile, diag);
}); },
});
function addMissingNewOperator(changes, sourceFile, span) {
var call = ts.cast(findAncestorMatchingSpan(sourceFile, span), ts.isCallExpression);
var newExpression = ts.createNew(call.expression, call.typeArguments, call.arguments);
changes.replaceNode(sourceFile, call, newExpression);
}
function findAncestorMatchingSpan(sourceFile, span) {
var token = ts.getTokenAtPosition(sourceFile, span.start);
var end = ts.textSpanEnd(span);
while (token.end < end) {
token = token.parent;
}
return token;
}
})(codefix = ts.codefix || (ts.codefix = {}));
})(ts || (ts = {}));
/* @internal */
var ts;
(function (ts) {
var codefix;
(function (codefix) {
Expand Down
2 changes: 1 addition & 1 deletion lib/typingsInstaller.js
Expand Up @@ -88,7 +88,7 @@ var ts;
// If changing the text in this section, be sure to test `configureNightly` too.
ts.versionMajorMinor = "3.2";
/** The version of the TypeScript compiler release */
ts.version = ts.versionMajorMinor + ".3";
ts.version = ts.versionMajorMinor + ".4";
})(ts || (ts = {}));
(function (ts) {
/* @internal */
Expand Down

0 comments on commit e7a0f7e

Please sign in to comment.