From 7c397a5ab1f0f4e9d52d797ca3d48b0e8162f594 Mon Sep 17 00:00:00 2001 From: Mine Starks Date: Mon, 4 Jan 2021 17:03:49 -0800 Subject: [PATCH] Bump version to 3.1.7 and LKG --- lib/tsc.js | 2 +- lib/tsserver.js | 23 ++++++++++++++++++++++- lib/tsserverlibrary.js | 23 ++++++++++++++++++++++- lib/typescript.js | 19 ++++++++++++++++++- lib/typescriptServices.js | 19 ++++++++++++++++++- lib/typingsInstaller.js | 19 ++++++++++++++++++- package.json | 2 +- src/compiler/core.ts | 2 +- 8 files changed, 101 insertions(+), 8 deletions(-) diff --git a/lib/tsc.js b/lib/tsc.js index 683e3353245..7ee199c51f5 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -60,7 +60,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook var ts; (function (ts) { ts.versionMajorMinor = "3.1"; - ts.version = ts.versionMajorMinor + ".6"; + ts.version = ts.versionMajorMinor + ".7"; })(ts || (ts = {})); (function (ts) { ts.emptyArray = []; diff --git a/lib/tsserver.js b/lib/tsserver.js index 71f3858491c..a1a65afa370 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.1"; /** The version of the TypeScript compiler release */ - ts.version = ts.versionMajorMinor + ".6"; + ts.version = ts.versionMajorMinor + ".7"; })(ts || (ts = {})); (function (ts) { /* @internal */ @@ -11130,9 +11130,11 @@ var ts; secondAccessor = member; } if (member.kind === 156 /* GetAccessor */ && !getAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion getAccessor = member; } if (member.kind === 157 /* SetAccessor */ && !setAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion setAccessor = member; } } @@ -22684,12 +22686,15 @@ var ts; context.hasNoDefaultLib = true; } else if (arg.arguments.types) { + // tslint:disable-next-line no-unnecessary-type-assertion typeReferenceDirectives_1.push({ pos: arg.arguments.types.pos, end: arg.arguments.types.end, fileName: arg.arguments.types.value }); } else if (arg.arguments.lib) { + // tslint:disable-next-line no-unnecessary-type-assertion libReferenceDirectives_1.push({ pos: arg.arguments.lib.pos, end: arg.arguments.lib.end, fileName: arg.arguments.lib.value }); } else if (arg.arguments.path) { + // tslint:disable-next-line no-unnecessary-type-assertion referencedFiles_1.push({ pos: arg.arguments.path.pos, end: arg.arguments.path.end, fileName: arg.arguments.path.value }); } else { @@ -28932,6 +28937,7 @@ var ts; // If this is a property-parameter, then also declare the property symbol into the // containing class. if (ts.isParameterPropertyDeclaration(node)) { + // tslint:disable-next-line no-unnecessary-type-assertion var classDeclaration = node.parent.parent; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); } @@ -38616,6 +38622,7 @@ var ts; break; } } + // tslint:disable-next-line no-unnecessary-type-assertion return links.resolvedType; // TODO: GH#18217 } function createIndexedAccessType(objectType, indexType) { @@ -53033,7 +53040,9 @@ var ts; if (node.kind === 235 /* VariableDeclaration */ || node.kind === 184 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } } @@ -57180,9 +57189,11 @@ var ts; node.kind === 194 /* FunctionExpression */ || node.kind === 154 /* MethodDeclaration */); if (node.flags & 4194304 /* Ambient */) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); } } @@ -57219,6 +57230,7 @@ var ts; } // Modifiers are never allowed on properties except for 'async' on a method declaration if (prop.modifiers) { + // tslint:disable-next-line no-unnecessary-type-assertion for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { // TODO: GH#19955 var mod = _c[_b]; if (mod.kind !== 120 /* AsyncKeyword */ || prop.kind !== 154 /* MethodDeclaration */) { @@ -57566,13 +57578,16 @@ var ts; var isConstOrReadonly = ts.isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && ts.isVarConst(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); } } else { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } if (!isConstOrReadonly || isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } } @@ -80492,6 +80507,7 @@ var ts; ts.Debug.assert(declarationTransform.transformed.length === 1, "Should only see one output from the decl transform"); printSourceFileOrBundle(declarationFilePath, declarationMapPath, declarationTransform.transformed[0], /* bundleInfopath*/ undefined, declarationPrinter, declarationSourceMap); if (emitOnlyDtsFiles && declarationTransform.transformed[0].kind === 277 /* SourceFile */) { + // tslint:disable-next-line no-unnecessary-type-assertion var sourceFile = declarationTransform.transformed[0]; exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit; } @@ -86828,6 +86844,7 @@ var ts; if (useOldState) { // Verify the sanity of old state if (!oldState.currentChangedFilePath) { + // tslint:disable-next-line no-unnecessary-type-assertion ts.Debug.assert(!oldState.affectedFiles && (!oldState.currentAffectedFilesSignatures || !oldState.currentAffectedFilesSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated"); } if (canCopySemanticDiagnostics) { @@ -118935,6 +118952,10 @@ var ts; Project.prototype.enablePlugin = function (pluginConfigEntry, searchPaths, pluginConfigOverrides) { var _this = this; this.projectService.logger.info("Enabling plugin " + pluginConfigEntry.name + " from candidate paths: " + searchPaths.join(",")); + if (ts.parsePackageName(pluginConfigEntry.name).rest) { + this.projectService.logger.info("kipped loading plugin " + pluginConfigEntry.name + " because only package name is allowed plugin name"); + return; + } var log = function (message) { _this.projectService.logger.info(message); }; diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 749b47b0930..40e4f1e1bf6 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.1"; /** The version of the TypeScript compiler release */ - ts.version = ts.versionMajorMinor + ".6"; + ts.version = ts.versionMajorMinor + ".7"; })(ts || (ts = {})); (function (ts) { /* @internal */ @@ -11126,9 +11126,11 @@ var ts; secondAccessor = member; } if (member.kind === 156 /* GetAccessor */ && !getAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion getAccessor = member; } if (member.kind === 157 /* SetAccessor */ && !setAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion setAccessor = member; } } @@ -22680,12 +22682,15 @@ var ts; context.hasNoDefaultLib = true; } else if (arg.arguments.types) { + // tslint:disable-next-line no-unnecessary-type-assertion typeReferenceDirectives_1.push({ pos: arg.arguments.types.pos, end: arg.arguments.types.end, fileName: arg.arguments.types.value }); } else if (arg.arguments.lib) { + // tslint:disable-next-line no-unnecessary-type-assertion libReferenceDirectives_1.push({ pos: arg.arguments.lib.pos, end: arg.arguments.lib.end, fileName: arg.arguments.lib.value }); } else if (arg.arguments.path) { + // tslint:disable-next-line no-unnecessary-type-assertion referencedFiles_1.push({ pos: arg.arguments.path.pos, end: arg.arguments.path.end, fileName: arg.arguments.path.value }); } else { @@ -28928,6 +28933,7 @@ var ts; // If this is a property-parameter, then also declare the property symbol into the // containing class. if (ts.isParameterPropertyDeclaration(node)) { + // tslint:disable-next-line no-unnecessary-type-assertion var classDeclaration = node.parent.parent; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); } @@ -38612,6 +38618,7 @@ var ts; break; } } + // tslint:disable-next-line no-unnecessary-type-assertion return links.resolvedType; // TODO: GH#18217 } function createIndexedAccessType(objectType, indexType) { @@ -53029,7 +53036,9 @@ var ts; if (node.kind === 235 /* VariableDeclaration */ || node.kind === 184 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } } @@ -57176,9 +57185,11 @@ var ts; node.kind === 194 /* FunctionExpression */ || node.kind === 154 /* MethodDeclaration */); if (node.flags & 4194304 /* Ambient */) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); } } @@ -57215,6 +57226,7 @@ var ts; } // Modifiers are never allowed on properties except for 'async' on a method declaration if (prop.modifiers) { + // tslint:disable-next-line no-unnecessary-type-assertion for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { // TODO: GH#19955 var mod = _c[_b]; if (mod.kind !== 120 /* AsyncKeyword */ || prop.kind !== 154 /* MethodDeclaration */) { @@ -57562,13 +57574,16 @@ var ts; var isConstOrReadonly = ts.isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && ts.isVarConst(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); } } else { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } if (!isConstOrReadonly || isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } } @@ -80488,6 +80503,7 @@ var ts; ts.Debug.assert(declarationTransform.transformed.length === 1, "Should only see one output from the decl transform"); printSourceFileOrBundle(declarationFilePath, declarationMapPath, declarationTransform.transformed[0], /* bundleInfopath*/ undefined, declarationPrinter, declarationSourceMap); if (emitOnlyDtsFiles && declarationTransform.transformed[0].kind === 277 /* SourceFile */) { + // tslint:disable-next-line no-unnecessary-type-assertion var sourceFile = declarationTransform.transformed[0]; exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit; } @@ -86824,6 +86840,7 @@ var ts; if (useOldState) { // Verify the sanity of old state if (!oldState.currentChangedFilePath) { + // tslint:disable-next-line no-unnecessary-type-assertion ts.Debug.assert(!oldState.affectedFiles && (!oldState.currentAffectedFilesSignatures || !oldState.currentAffectedFilesSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated"); } if (canCopySemanticDiagnostics) { @@ -119109,6 +119126,10 @@ var ts; Project.prototype.enablePlugin = function (pluginConfigEntry, searchPaths, pluginConfigOverrides) { var _this = this; this.projectService.logger.info("Enabling plugin " + pluginConfigEntry.name + " from candidate paths: " + searchPaths.join(",")); + if (ts.parsePackageName(pluginConfigEntry.name).rest) { + this.projectService.logger.info("kipped loading plugin " + pluginConfigEntry.name + " because only package name is allowed plugin name"); + return; + } var log = function (message) { _this.projectService.logger.info(message); }; diff --git a/lib/typescript.js b/lib/typescript.js index 2a7713f3758..a32b15bd61b 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.1"; /** The version of the TypeScript compiler release */ - ts.version = ts.versionMajorMinor + ".6"; + ts.version = ts.versionMajorMinor + ".7"; })(ts || (ts = {})); (function (ts) { /* @internal */ @@ -11117,9 +11117,11 @@ var ts; secondAccessor = member; } if (member.kind === 156 /* GetAccessor */ && !getAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion getAccessor = member; } if (member.kind === 157 /* SetAccessor */ && !setAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion setAccessor = member; } } @@ -22671,12 +22673,15 @@ var ts; context.hasNoDefaultLib = true; } else if (arg.arguments.types) { + // tslint:disable-next-line no-unnecessary-type-assertion typeReferenceDirectives_1.push({ pos: arg.arguments.types.pos, end: arg.arguments.types.end, fileName: arg.arguments.types.value }); } else if (arg.arguments.lib) { + // tslint:disable-next-line no-unnecessary-type-assertion libReferenceDirectives_1.push({ pos: arg.arguments.lib.pos, end: arg.arguments.lib.end, fileName: arg.arguments.lib.value }); } else if (arg.arguments.path) { + // tslint:disable-next-line no-unnecessary-type-assertion referencedFiles_1.push({ pos: arg.arguments.path.pos, end: arg.arguments.path.end, fileName: arg.arguments.path.value }); } else { @@ -28919,6 +28924,7 @@ var ts; // If this is a property-parameter, then also declare the property symbol into the // containing class. if (ts.isParameterPropertyDeclaration(node)) { + // tslint:disable-next-line no-unnecessary-type-assertion var classDeclaration = node.parent.parent; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); } @@ -38603,6 +38609,7 @@ var ts; break; } } + // tslint:disable-next-line no-unnecessary-type-assertion return links.resolvedType; // TODO: GH#18217 } function createIndexedAccessType(objectType, indexType) { @@ -53020,7 +53027,9 @@ var ts; if (node.kind === 235 /* VariableDeclaration */ || node.kind === 184 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } } @@ -57167,9 +57176,11 @@ var ts; node.kind === 194 /* FunctionExpression */ || node.kind === 154 /* MethodDeclaration */); if (node.flags & 4194304 /* Ambient */) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); } } @@ -57206,6 +57217,7 @@ var ts; } // Modifiers are never allowed on properties except for 'async' on a method declaration if (prop.modifiers) { + // tslint:disable-next-line no-unnecessary-type-assertion for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { // TODO: GH#19955 var mod = _c[_b]; if (mod.kind !== 120 /* AsyncKeyword */ || prop.kind !== 154 /* MethodDeclaration */) { @@ -57553,13 +57565,16 @@ var ts; var isConstOrReadonly = ts.isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && ts.isVarConst(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); } } else { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } if (!isConstOrReadonly || isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } } @@ -80479,6 +80494,7 @@ var ts; ts.Debug.assert(declarationTransform.transformed.length === 1, "Should only see one output from the decl transform"); printSourceFileOrBundle(declarationFilePath, declarationMapPath, declarationTransform.transformed[0], /* bundleInfopath*/ undefined, declarationPrinter, declarationSourceMap); if (emitOnlyDtsFiles && declarationTransform.transformed[0].kind === 277 /* SourceFile */) { + // tslint:disable-next-line no-unnecessary-type-assertion var sourceFile = declarationTransform.transformed[0]; exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit; } @@ -86815,6 +86831,7 @@ var ts; if (useOldState) { // Verify the sanity of old state if (!oldState.currentChangedFilePath) { + // tslint:disable-next-line no-unnecessary-type-assertion ts.Debug.assert(!oldState.affectedFiles && (!oldState.currentAffectedFilesSignatures || !oldState.currentAffectedFilesSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated"); } if (canCopySemanticDiagnostics) { diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 2a7713f3758..a32b15bd61b 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.1"; /** The version of the TypeScript compiler release */ - ts.version = ts.versionMajorMinor + ".6"; + ts.version = ts.versionMajorMinor + ".7"; })(ts || (ts = {})); (function (ts) { /* @internal */ @@ -11117,9 +11117,11 @@ var ts; secondAccessor = member; } if (member.kind === 156 /* GetAccessor */ && !getAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion getAccessor = member; } if (member.kind === 157 /* SetAccessor */ && !setAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion setAccessor = member; } } @@ -22671,12 +22673,15 @@ var ts; context.hasNoDefaultLib = true; } else if (arg.arguments.types) { + // tslint:disable-next-line no-unnecessary-type-assertion typeReferenceDirectives_1.push({ pos: arg.arguments.types.pos, end: arg.arguments.types.end, fileName: arg.arguments.types.value }); } else if (arg.arguments.lib) { + // tslint:disable-next-line no-unnecessary-type-assertion libReferenceDirectives_1.push({ pos: arg.arguments.lib.pos, end: arg.arguments.lib.end, fileName: arg.arguments.lib.value }); } else if (arg.arguments.path) { + // tslint:disable-next-line no-unnecessary-type-assertion referencedFiles_1.push({ pos: arg.arguments.path.pos, end: arg.arguments.path.end, fileName: arg.arguments.path.value }); } else { @@ -28919,6 +28924,7 @@ var ts; // If this is a property-parameter, then also declare the property symbol into the // containing class. if (ts.isParameterPropertyDeclaration(node)) { + // tslint:disable-next-line no-unnecessary-type-assertion var classDeclaration = node.parent.parent; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); } @@ -38603,6 +38609,7 @@ var ts; break; } } + // tslint:disable-next-line no-unnecessary-type-assertion return links.resolvedType; // TODO: GH#18217 } function createIndexedAccessType(objectType, indexType) { @@ -53020,7 +53027,9 @@ var ts; if (node.kind === 235 /* VariableDeclaration */ || node.kind === 184 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } } @@ -57167,9 +57176,11 @@ var ts; node.kind === 194 /* FunctionExpression */ || node.kind === 154 /* MethodDeclaration */); if (node.flags & 4194304 /* Ambient */) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); } } @@ -57206,6 +57217,7 @@ var ts; } // Modifiers are never allowed on properties except for 'async' on a method declaration if (prop.modifiers) { + // tslint:disable-next-line no-unnecessary-type-assertion for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { // TODO: GH#19955 var mod = _c[_b]; if (mod.kind !== 120 /* AsyncKeyword */ || prop.kind !== 154 /* MethodDeclaration */) { @@ -57553,13 +57565,16 @@ var ts; var isConstOrReadonly = ts.isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && ts.isVarConst(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); } } else { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } if (!isConstOrReadonly || isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } } @@ -80479,6 +80494,7 @@ var ts; ts.Debug.assert(declarationTransform.transformed.length === 1, "Should only see one output from the decl transform"); printSourceFileOrBundle(declarationFilePath, declarationMapPath, declarationTransform.transformed[0], /* bundleInfopath*/ undefined, declarationPrinter, declarationSourceMap); if (emitOnlyDtsFiles && declarationTransform.transformed[0].kind === 277 /* SourceFile */) { + // tslint:disable-next-line no-unnecessary-type-assertion var sourceFile = declarationTransform.transformed[0]; exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit; } @@ -86815,6 +86831,7 @@ var ts; if (useOldState) { // Verify the sanity of old state if (!oldState.currentChangedFilePath) { + // tslint:disable-next-line no-unnecessary-type-assertion ts.Debug.assert(!oldState.affectedFiles && (!oldState.currentAffectedFilesSignatures || !oldState.currentAffectedFilesSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated"); } if (canCopySemanticDiagnostics) { diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index e20413eebef..b8f83896e98 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.1"; /** The version of the TypeScript compiler release */ - ts.version = ts.versionMajorMinor + ".6"; + ts.version = ts.versionMajorMinor + ".7"; })(ts || (ts = {})); (function (ts) { /* @internal */ @@ -11130,9 +11130,11 @@ var ts; secondAccessor = member; } if (member.kind === 156 /* GetAccessor */ && !getAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion getAccessor = member; } if (member.kind === 157 /* SetAccessor */ && !setAccessor) { + // tslint:disable-next-line no-unnecessary-type-assertion setAccessor = member; } } @@ -22684,12 +22686,15 @@ var ts; context.hasNoDefaultLib = true; } else if (arg.arguments.types) { + // tslint:disable-next-line no-unnecessary-type-assertion typeReferenceDirectives_1.push({ pos: arg.arguments.types.pos, end: arg.arguments.types.end, fileName: arg.arguments.types.value }); } else if (arg.arguments.lib) { + // tslint:disable-next-line no-unnecessary-type-assertion libReferenceDirectives_1.push({ pos: arg.arguments.lib.pos, end: arg.arguments.lib.end, fileName: arg.arguments.lib.value }); } else if (arg.arguments.path) { + // tslint:disable-next-line no-unnecessary-type-assertion referencedFiles_1.push({ pos: arg.arguments.path.pos, end: arg.arguments.path.end, fileName: arg.arguments.path.value }); } else { @@ -28932,6 +28937,7 @@ var ts; // If this is a property-parameter, then also declare the property symbol into the // containing class. if (ts.isParameterPropertyDeclaration(node)) { + // tslint:disable-next-line no-unnecessary-type-assertion var classDeclaration = node.parent.parent; declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); } @@ -38616,6 +38622,7 @@ var ts; break; } } + // tslint:disable-next-line no-unnecessary-type-assertion return links.resolvedType; // TODO: GH#18217 } function createIndexedAccessType(objectType, indexType) { @@ -53033,7 +53040,9 @@ var ts; if (node.kind === 235 /* VariableDeclaration */ || node.kind === 184 /* BindingElement */) { checkVarDeclaredNamesNotShadowed(node); } + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithRequireExportsInGeneratedCode(node, node.name); + // tslint:disable-next-line no-unnecessary-type-assertion checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name); } } @@ -57180,9 +57189,11 @@ var ts; node.kind === 194 /* FunctionExpression */ || node.kind === 154 /* MethodDeclaration */); if (node.flags & 4194304 /* Ambient */) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); } if (!node.body) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); } } @@ -57219,6 +57230,7 @@ var ts; } // Modifiers are never allowed on properties except for 'async' on a method declaration if (prop.modifiers) { + // tslint:disable-next-line no-unnecessary-type-assertion for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) { // TODO: GH#19955 var mod = _c[_b]; if (mod.kind !== 120 /* AsyncKeyword */ || prop.kind !== 154 /* MethodDeclaration */) { @@ -57566,13 +57578,16 @@ var ts; var isConstOrReadonly = ts.isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && ts.isVarConst(node); if (isConstOrReadonly && !node.type) { if (isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); } } else { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } if (!isConstOrReadonly || isInvalidInitializer) { + // tslint:disable-next-line no-unnecessary-type-assertion return grammarErrorOnNode(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); } } @@ -80492,6 +80507,7 @@ var ts; ts.Debug.assert(declarationTransform.transformed.length === 1, "Should only see one output from the decl transform"); printSourceFileOrBundle(declarationFilePath, declarationMapPath, declarationTransform.transformed[0], /* bundleInfopath*/ undefined, declarationPrinter, declarationSourceMap); if (emitOnlyDtsFiles && declarationTransform.transformed[0].kind === 277 /* SourceFile */) { + // tslint:disable-next-line no-unnecessary-type-assertion var sourceFile = declarationTransform.transformed[0]; exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit; } @@ -86828,6 +86844,7 @@ var ts; if (useOldState) { // Verify the sanity of old state if (!oldState.currentChangedFilePath) { + // tslint:disable-next-line no-unnecessary-type-assertion ts.Debug.assert(!oldState.affectedFiles && (!oldState.currentAffectedFilesSignatures || !oldState.currentAffectedFilesSignatures.size), "Cannot reuse if only few affected files of currentChangedFile were iterated"); } if (canCopySemanticDiagnostics) { diff --git a/package.json b/package.json index b6826f61901..71230f17737 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "http://typescriptlang.org/", - "version": "3.1.6", + "version": "3.1.7", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 6880171ea67..ca48c21e8e9 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -3,7 +3,7 @@ namespace ts { // If changing the text in this section, be sure to test `configureNightly` too. export const versionMajorMinor = "3.1"; /** The version of the TypeScript compiler release */ - export const version = `${versionMajorMinor}.6`; + export const version = `${versionMajorMinor}.7`; } namespace ts {