diff --git a/lib/tsc.js b/lib/tsc.js index 992811942e233..4447395a6cc21 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -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 = []; diff --git a/lib/tsserver.js b/lib/tsserver.js index 9bba8544f53ad..60e368ad802dd 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -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 */ @@ -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(); diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index e3b95b651a855..44355d0c2c5ed 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -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 */ @@ -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) { @@ -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) { @@ -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(); diff --git a/lib/typescript.js b/lib/typescript.js index f16d895180a5f..0958aeda680bf 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -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 */ @@ -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) { @@ -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) { diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index f16d895180a5f..0958aeda680bf 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -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 */ @@ -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) { @@ -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) { diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index d246e562c6f4e..5e0e50ddc091c 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -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 */