typescript 4.9.0-dev.20221019 → 4.9.0-dev.20221021

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.9";
72
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221019");
72
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221021");
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -34525,12 +34525,22 @@ var ts;
34525
34525
  return !isCommandLineOnly && category !== undefined && (!categoriesToSkip.includes(category) || compilerOptionsMap.has(name));
34526
34526
  }
34527
34527
  function writeConfigurations() {
34528
- var categorizedOptions = ts.createMultiMap();
34528
+ var categorizedOptions = new ts.Map();
34529
+ categorizedOptions.set(ts.Diagnostics.Projects, []);
34530
+ categorizedOptions.set(ts.Diagnostics.Language_and_Environment, []);
34531
+ categorizedOptions.set(ts.Diagnostics.Modules, []);
34532
+ categorizedOptions.set(ts.Diagnostics.JavaScript_Support, []);
34533
+ categorizedOptions.set(ts.Diagnostics.Emit, []);
34534
+ categorizedOptions.set(ts.Diagnostics.Interop_Constraints, []);
34535
+ categorizedOptions.set(ts.Diagnostics.Type_Checking, []);
34536
+ categorizedOptions.set(ts.Diagnostics.Completeness, []);
34529
34537
  for (var _i = 0, optionDeclarations_1 = ts.optionDeclarations; _i < optionDeclarations_1.length; _i++) {
34530
34538
  var option = optionDeclarations_1[_i];
34531
- var category = option.category;
34532
34539
  if (isAllowedOptionForOutput(option)) {
34533
- categorizedOptions.add(ts.getLocaleSpecificMessage(category), option);
34540
+ var listForCategory = categorizedOptions.get(option.category);
34541
+ if (!listForCategory)
34542
+ categorizedOptions.set(option.category, listForCategory = []);
34543
+ listForCategory.push(option);
34534
34544
  }
34535
34545
  }
34536
34546
  var marginLength = 0;
@@ -34540,7 +34550,7 @@ var ts;
34540
34550
  if (entries.length !== 0) {
34541
34551
  entries.push({ value: "" });
34542
34552
  }
34543
- entries.push({ value: "/* ".concat(category, " */") });
34553
+ entries.push({ value: "/* ".concat(ts.getLocaleSpecificMessage(category), " */") });
34544
34554
  for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
34545
34555
  var option = options_1[_i];
34546
34556
  var optionName = void 0;
@@ -55946,7 +55956,7 @@ var ts;
55946
55956
  if (relation !== identityRelation) {
55947
55957
  if (!result && (source.flags & 2097152 || source.flags & 262144 && target.flags & 1048576)) {
55948
55958
  var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 ? source.types : [source], !!(target.flags & 1048576));
55949
- if (constraint && !(constraint.flags & 131072) && everyType(constraint, function (c) { return c !== source; })) {
55959
+ if (constraint && everyType(constraint, function (c) { return c !== source; })) {
55950
55960
  result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState);
55951
55961
  }
55952
55962
  }
@@ -57526,8 +57536,7 @@ var ts;
57526
57536
  return !!(type.flags & 109440);
57527
57537
  }
57528
57538
  function isUnitLikeType(type) {
57529
- return type.flags & 2097152 ? ts.some(type.types, isUnitType) :
57530
- !!(type.flags & 109440);
57539
+ return isUnitType(getBaseConstraintOrType(type));
57531
57540
  }
57532
57541
  function extractUnitType(type) {
57533
57542
  return type.flags & 2097152 ? ts.find(type.types, isUnitType) || type : type;
@@ -61163,10 +61172,10 @@ var ts;
61163
61172
  function markAliasReferenced(symbol, location) {
61164
61173
  if (isNonLocalAlias(symbol, 111551) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551)) {
61165
61174
  var target = resolveAlias(symbol);
61166
- if (getAllSymbolFlags(target) & 111551) {
61175
+ if (getAllSymbolFlags(target) & (111551 | 1048576)) {
61167
61176
  if (compilerOptions.isolatedModules ||
61168
61177
  ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
61169
- !isConstEnumOrConstEnumOnlyModule(target)) {
61178
+ !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
61170
61179
  markAliasSymbolAsReferenced(symbol);
61171
61180
  }
61172
61181
  else {
@@ -61328,7 +61337,7 @@ var ts;
61328
61337
  (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter && !isSymbolAssigned(localOrExportSymbol))) {
61329
61338
  flowContainer = getControlFlowContainer(flowContainer);
61330
61339
  }
61331
- var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || ts.isBindingElement(declaration) ||
61340
+ var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) ||
61332
61341
  type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 | 16384)) !== 0 ||
61333
61342
  isInTypeQuery(node) || node.parent.kind === 278) ||
61334
61343
  node.parent.kind === 232 ||
@@ -61353,6 +61362,12 @@ var ts;
61353
61362
  }
61354
61363
  return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
61355
61364
  }
61365
+ function isSameScopedBindingElement(node, declaration) {
61366
+ if (ts.isBindingElement(declaration)) {
61367
+ var bindingElement = ts.findAncestor(node, ts.isBindingElement);
61368
+ return bindingElement && ts.getRootDeclaration(bindingElement) === ts.getRootDeclaration(declaration);
61369
+ }
61370
+ }
61356
61371
  function shouldMarkIdentifierAliasReferenced(node) {
61357
61372
  var _a;
61358
61373
  var parent = node.parent;
package/lib/tsserver.js CHANGED
@@ -109,7 +109,7 @@ var ts;
109
109
  // The following is baselined as a literal template type without intervention
110
110
  /** The version of the TypeScript compiler release */
111
111
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
112
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221019");
112
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221021");
113
113
  /* @internal */
114
114
  var Comparison;
115
115
  (function (Comparison) {
@@ -42271,12 +42271,23 @@ var ts;
42271
42271
  }
42272
42272
  function writeConfigurations() {
42273
42273
  // Filter applicable options to place in the file
42274
- var categorizedOptions = ts.createMultiMap();
42274
+ var categorizedOptions = new ts.Map();
42275
+ // Set allowed categories in order
42276
+ categorizedOptions.set(ts.Diagnostics.Projects, []);
42277
+ categorizedOptions.set(ts.Diagnostics.Language_and_Environment, []);
42278
+ categorizedOptions.set(ts.Diagnostics.Modules, []);
42279
+ categorizedOptions.set(ts.Diagnostics.JavaScript_Support, []);
42280
+ categorizedOptions.set(ts.Diagnostics.Emit, []);
42281
+ categorizedOptions.set(ts.Diagnostics.Interop_Constraints, []);
42282
+ categorizedOptions.set(ts.Diagnostics.Type_Checking, []);
42283
+ categorizedOptions.set(ts.Diagnostics.Completeness, []);
42275
42284
  for (var _i = 0, optionDeclarations_1 = ts.optionDeclarations; _i < optionDeclarations_1.length; _i++) {
42276
42285
  var option = optionDeclarations_1[_i];
42277
- var category = option.category;
42278
42286
  if (isAllowedOptionForOutput(option)) {
42279
- categorizedOptions.add(ts.getLocaleSpecificMessage(category), option);
42287
+ var listForCategory = categorizedOptions.get(option.category);
42288
+ if (!listForCategory)
42289
+ categorizedOptions.set(option.category, listForCategory = []);
42290
+ listForCategory.push(option);
42280
42291
  }
42281
42292
  }
42282
42293
  // Serialize all options and their descriptions
@@ -42287,7 +42298,7 @@ var ts;
42287
42298
  if (entries.length !== 0) {
42288
42299
  entries.push({ value: "" });
42289
42300
  }
42290
- entries.push({ value: "/* ".concat(category, " */") });
42301
+ entries.push({ value: "/* ".concat(ts.getLocaleSpecificMessage(category), " */") });
42291
42302
  for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
42292
42303
  var option = options_1[_i];
42293
42304
  var optionName = void 0;
@@ -67002,7 +67013,7 @@ var ts;
67002
67013
  // For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
67003
67014
  if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
67004
67015
  var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
67005
- if (constraint && !(constraint.flags & 131072 /* TypeFlags.Never */) && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
67016
+ if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
67006
67017
  // TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
67007
67018
  result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
67008
67019
  }
@@ -68891,8 +68902,7 @@ var ts;
68891
68902
  return !!(type.flags & 109440 /* TypeFlags.Unit */);
68892
68903
  }
68893
68904
  function isUnitLikeType(type) {
68894
- return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.some(type.types, isUnitType) :
68895
- !!(type.flags & 109440 /* TypeFlags.Unit */);
68905
+ return isUnitType(getBaseConstraintOrType(type));
68896
68906
  }
68897
68907
  function extractUnitType(type) {
68898
68908
  return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
@@ -73065,13 +73075,13 @@ var ts;
73065
73075
  function markAliasReferenced(symbol, location) {
73066
73076
  if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
73067
73077
  var target = resolveAlias(symbol);
73068
- if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
73078
+ if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
73069
73079
  // An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
73070
73080
  // (because the const enum value will not be inlined), or if (2) the alias is an export
73071
73081
  // of a const enum declaration that will be preserved.
73072
73082
  if (compilerOptions.isolatedModules ||
73073
73083
  ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
73074
- !isConstEnumOrConstEnumOnlyModule(target)) {
73084
+ !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
73075
73085
  markAliasSymbolAsReferenced(symbol);
73076
73086
  }
73077
73087
  else {
@@ -73299,7 +73309,7 @@ var ts;
73299
73309
  // We only look for uninitialized variables in strict null checking mode, and only when we can analyze
73300
73310
  // the entire control flow graph from the variable's declaration (i.e. when the flow container and
73301
73311
  // declaration container are the same).
73302
- var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || ts.isBindingElement(declaration) ||
73312
+ var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) ||
73303
73313
  type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* TypeFlags.AnyOrUnknown */ | 16384 /* TypeFlags.Void */)) !== 0 ||
73304
73314
  isInTypeQuery(node) || node.parent.kind === 278 /* SyntaxKind.ExportSpecifier */) ||
73305
73315
  node.parent.kind === 232 /* SyntaxKind.NonNullExpression */ ||
@@ -73328,6 +73338,12 @@ var ts;
73328
73338
  }
73329
73339
  return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
73330
73340
  }
73341
+ function isSameScopedBindingElement(node, declaration) {
73342
+ if (ts.isBindingElement(declaration)) {
73343
+ var bindingElement = ts.findAncestor(node, ts.isBindingElement);
73344
+ return bindingElement && ts.getRootDeclaration(bindingElement) === ts.getRootDeclaration(declaration);
73345
+ }
73346
+ }
73331
73347
  function shouldMarkIdentifierAliasReferenced(node) {
73332
73348
  var _a;
73333
73349
  var parent = node.parent;
@@ -142730,6 +142746,12 @@ var ts;
142730
142746
  var label = ts.getTargetLabel(node.parent, node.text);
142731
142747
  return label ? [createDefinitionInfoFromName(typeChecker, label, "label" /* ScriptElementKind.label */, node.text, /*containerName*/ undefined)] : undefined; // TODO: GH#18217
142732
142748
  }
142749
+ if (node.kind === 105 /* SyntaxKind.ReturnKeyword */) {
142750
+ var functionDeclaration = ts.findAncestor(node.parent, function (n) {
142751
+ return ts.isClassStaticBlockDeclaration(n) ? "quit" : ts.isFunctionLikeDeclaration(n);
142752
+ });
142753
+ return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : undefined;
142754
+ }
142733
142755
  if (ts.isStaticModifier(node) && ts.isClassStaticBlockDeclaration(node.parent)) {
142734
142756
  var classDecl = node.parent.parent;
142735
142757
  var _c = getSymbol(classDecl, typeChecker, stopAtAlias), symbol_1 = _c.symbol, failedAliasResolution_1 = _c.failedAliasResolution;
@@ -108,7 +108,7 @@ var ts;
108
108
  // The following is baselined as a literal template type without intervention
109
109
  /** The version of the TypeScript compiler release */
110
110
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
111
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221019");
111
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221021");
112
112
  /* @internal */
113
113
  var Comparison;
114
114
  (function (Comparison) {
@@ -42270,12 +42270,23 @@ var ts;
42270
42270
  }
42271
42271
  function writeConfigurations() {
42272
42272
  // Filter applicable options to place in the file
42273
- var categorizedOptions = ts.createMultiMap();
42273
+ var categorizedOptions = new ts.Map();
42274
+ // Set allowed categories in order
42275
+ categorizedOptions.set(ts.Diagnostics.Projects, []);
42276
+ categorizedOptions.set(ts.Diagnostics.Language_and_Environment, []);
42277
+ categorizedOptions.set(ts.Diagnostics.Modules, []);
42278
+ categorizedOptions.set(ts.Diagnostics.JavaScript_Support, []);
42279
+ categorizedOptions.set(ts.Diagnostics.Emit, []);
42280
+ categorizedOptions.set(ts.Diagnostics.Interop_Constraints, []);
42281
+ categorizedOptions.set(ts.Diagnostics.Type_Checking, []);
42282
+ categorizedOptions.set(ts.Diagnostics.Completeness, []);
42274
42283
  for (var _i = 0, optionDeclarations_1 = ts.optionDeclarations; _i < optionDeclarations_1.length; _i++) {
42275
42284
  var option = optionDeclarations_1[_i];
42276
- var category = option.category;
42277
42285
  if (isAllowedOptionForOutput(option)) {
42278
- categorizedOptions.add(ts.getLocaleSpecificMessage(category), option);
42286
+ var listForCategory = categorizedOptions.get(option.category);
42287
+ if (!listForCategory)
42288
+ categorizedOptions.set(option.category, listForCategory = []);
42289
+ listForCategory.push(option);
42279
42290
  }
42280
42291
  }
42281
42292
  // Serialize all options and their descriptions
@@ -42286,7 +42297,7 @@ var ts;
42286
42297
  if (entries.length !== 0) {
42287
42298
  entries.push({ value: "" });
42288
42299
  }
42289
- entries.push({ value: "/* ".concat(category, " */") });
42300
+ entries.push({ value: "/* ".concat(ts.getLocaleSpecificMessage(category), " */") });
42290
42301
  for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
42291
42302
  var option = options_1[_i];
42292
42303
  var optionName = void 0;
@@ -67001,7 +67012,7 @@ var ts;
67001
67012
  // For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
67002
67013
  if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
67003
67014
  var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
67004
- if (constraint && !(constraint.flags & 131072 /* TypeFlags.Never */) && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
67015
+ if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
67005
67016
  // TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
67006
67017
  result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
67007
67018
  }
@@ -68890,8 +68901,7 @@ var ts;
68890
68901
  return !!(type.flags & 109440 /* TypeFlags.Unit */);
68891
68902
  }
68892
68903
  function isUnitLikeType(type) {
68893
- return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.some(type.types, isUnitType) :
68894
- !!(type.flags & 109440 /* TypeFlags.Unit */);
68904
+ return isUnitType(getBaseConstraintOrType(type));
68895
68905
  }
68896
68906
  function extractUnitType(type) {
68897
68907
  return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
@@ -73064,13 +73074,13 @@ var ts;
73064
73074
  function markAliasReferenced(symbol, location) {
73065
73075
  if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
73066
73076
  var target = resolveAlias(symbol);
73067
- if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
73077
+ if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
73068
73078
  // An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
73069
73079
  // (because the const enum value will not be inlined), or if (2) the alias is an export
73070
73080
  // of a const enum declaration that will be preserved.
73071
73081
  if (compilerOptions.isolatedModules ||
73072
73082
  ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
73073
- !isConstEnumOrConstEnumOnlyModule(target)) {
73083
+ !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
73074
73084
  markAliasSymbolAsReferenced(symbol);
73075
73085
  }
73076
73086
  else {
@@ -73298,7 +73308,7 @@ var ts;
73298
73308
  // We only look for uninitialized variables in strict null checking mode, and only when we can analyze
73299
73309
  // the entire control flow graph from the variable's declaration (i.e. when the flow container and
73300
73310
  // declaration container are the same).
73301
- var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || ts.isBindingElement(declaration) ||
73311
+ var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) ||
73302
73312
  type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* TypeFlags.AnyOrUnknown */ | 16384 /* TypeFlags.Void */)) !== 0 ||
73303
73313
  isInTypeQuery(node) || node.parent.kind === 278 /* SyntaxKind.ExportSpecifier */) ||
73304
73314
  node.parent.kind === 232 /* SyntaxKind.NonNullExpression */ ||
@@ -73327,6 +73337,12 @@ var ts;
73327
73337
  }
73328
73338
  return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
73329
73339
  }
73340
+ function isSameScopedBindingElement(node, declaration) {
73341
+ if (ts.isBindingElement(declaration)) {
73342
+ var bindingElement = ts.findAncestor(node, ts.isBindingElement);
73343
+ return bindingElement && ts.getRootDeclaration(bindingElement) === ts.getRootDeclaration(declaration);
73344
+ }
73345
+ }
73330
73346
  function shouldMarkIdentifierAliasReferenced(node) {
73331
73347
  var _a;
73332
73348
  var parent = node.parent;
@@ -143148,6 +143164,12 @@ var ts;
143148
143164
  var label = ts.getTargetLabel(node.parent, node.text);
143149
143165
  return label ? [createDefinitionInfoFromName(typeChecker, label, "label" /* ScriptElementKind.label */, node.text, /*containerName*/ undefined)] : undefined; // TODO: GH#18217
143150
143166
  }
143167
+ if (node.kind === 105 /* SyntaxKind.ReturnKeyword */) {
143168
+ var functionDeclaration = ts.findAncestor(node.parent, function (n) {
143169
+ return ts.isClassStaticBlockDeclaration(n) ? "quit" : ts.isFunctionLikeDeclaration(n);
143170
+ });
143171
+ return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : undefined;
143172
+ }
143151
143173
  if (ts.isStaticModifier(node) && ts.isClassStaticBlockDeclaration(node.parent)) {
143152
143174
  var classDecl = node.parent.parent;
143153
143175
  var _c = getSymbol(classDecl, typeChecker, stopAtAlias), symbol_1 = _c.symbol, failedAliasResolution_1 = _c.failedAliasResolution;
package/lib/typescript.js CHANGED
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221019");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221021");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -42261,12 +42261,23 @@ var ts;
42261
42261
  }
42262
42262
  function writeConfigurations() {
42263
42263
  // Filter applicable options to place in the file
42264
- var categorizedOptions = ts.createMultiMap();
42264
+ var categorizedOptions = new ts.Map();
42265
+ // Set allowed categories in order
42266
+ categorizedOptions.set(ts.Diagnostics.Projects, []);
42267
+ categorizedOptions.set(ts.Diagnostics.Language_and_Environment, []);
42268
+ categorizedOptions.set(ts.Diagnostics.Modules, []);
42269
+ categorizedOptions.set(ts.Diagnostics.JavaScript_Support, []);
42270
+ categorizedOptions.set(ts.Diagnostics.Emit, []);
42271
+ categorizedOptions.set(ts.Diagnostics.Interop_Constraints, []);
42272
+ categorizedOptions.set(ts.Diagnostics.Type_Checking, []);
42273
+ categorizedOptions.set(ts.Diagnostics.Completeness, []);
42265
42274
  for (var _i = 0, optionDeclarations_1 = ts.optionDeclarations; _i < optionDeclarations_1.length; _i++) {
42266
42275
  var option = optionDeclarations_1[_i];
42267
- var category = option.category;
42268
42276
  if (isAllowedOptionForOutput(option)) {
42269
- categorizedOptions.add(ts.getLocaleSpecificMessage(category), option);
42277
+ var listForCategory = categorizedOptions.get(option.category);
42278
+ if (!listForCategory)
42279
+ categorizedOptions.set(option.category, listForCategory = []);
42280
+ listForCategory.push(option);
42270
42281
  }
42271
42282
  }
42272
42283
  // Serialize all options and their descriptions
@@ -42277,7 +42288,7 @@ var ts;
42277
42288
  if (entries.length !== 0) {
42278
42289
  entries.push({ value: "" });
42279
42290
  }
42280
- entries.push({ value: "/* ".concat(category, " */") });
42291
+ entries.push({ value: "/* ".concat(ts.getLocaleSpecificMessage(category), " */") });
42281
42292
  for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
42282
42293
  var option = options_1[_i];
42283
42294
  var optionName = void 0;
@@ -66992,7 +67003,7 @@ var ts;
66992
67003
  // For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
66993
67004
  if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
66994
67005
  var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
66995
- if (constraint && !(constraint.flags & 131072 /* TypeFlags.Never */) && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
67006
+ if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
66996
67007
  // TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
66997
67008
  result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
66998
67009
  }
@@ -68881,8 +68892,7 @@ var ts;
68881
68892
  return !!(type.flags & 109440 /* TypeFlags.Unit */);
68882
68893
  }
68883
68894
  function isUnitLikeType(type) {
68884
- return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.some(type.types, isUnitType) :
68885
- !!(type.flags & 109440 /* TypeFlags.Unit */);
68895
+ return isUnitType(getBaseConstraintOrType(type));
68886
68896
  }
68887
68897
  function extractUnitType(type) {
68888
68898
  return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
@@ -73055,13 +73065,13 @@ var ts;
73055
73065
  function markAliasReferenced(symbol, location) {
73056
73066
  if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
73057
73067
  var target = resolveAlias(symbol);
73058
- if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
73068
+ if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
73059
73069
  // An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
73060
73070
  // (because the const enum value will not be inlined), or if (2) the alias is an export
73061
73071
  // of a const enum declaration that will be preserved.
73062
73072
  if (compilerOptions.isolatedModules ||
73063
73073
  ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
73064
- !isConstEnumOrConstEnumOnlyModule(target)) {
73074
+ !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
73065
73075
  markAliasSymbolAsReferenced(symbol);
73066
73076
  }
73067
73077
  else {
@@ -73289,7 +73299,7 @@ var ts;
73289
73299
  // We only look for uninitialized variables in strict null checking mode, and only when we can analyze
73290
73300
  // the entire control flow graph from the variable's declaration (i.e. when the flow container and
73291
73301
  // declaration container are the same).
73292
- var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || ts.isBindingElement(declaration) ||
73302
+ var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) ||
73293
73303
  type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* TypeFlags.AnyOrUnknown */ | 16384 /* TypeFlags.Void */)) !== 0 ||
73294
73304
  isInTypeQuery(node) || node.parent.kind === 278 /* SyntaxKind.ExportSpecifier */) ||
73295
73305
  node.parent.kind === 232 /* SyntaxKind.NonNullExpression */ ||
@@ -73318,6 +73328,12 @@ var ts;
73318
73328
  }
73319
73329
  return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
73320
73330
  }
73331
+ function isSameScopedBindingElement(node, declaration) {
73332
+ if (ts.isBindingElement(declaration)) {
73333
+ var bindingElement = ts.findAncestor(node, ts.isBindingElement);
73334
+ return bindingElement && ts.getRootDeclaration(bindingElement) === ts.getRootDeclaration(declaration);
73335
+ }
73336
+ }
73321
73337
  function shouldMarkIdentifierAliasReferenced(node) {
73322
73338
  var _a;
73323
73339
  var parent = node.parent;
@@ -143139,6 +143155,12 @@ var ts;
143139
143155
  var label = ts.getTargetLabel(node.parent, node.text);
143140
143156
  return label ? [createDefinitionInfoFromName(typeChecker, label, "label" /* ScriptElementKind.label */, node.text, /*containerName*/ undefined)] : undefined; // TODO: GH#18217
143141
143157
  }
143158
+ if (node.kind === 105 /* SyntaxKind.ReturnKeyword */) {
143159
+ var functionDeclaration = ts.findAncestor(node.parent, function (n) {
143160
+ return ts.isClassStaticBlockDeclaration(n) ? "quit" : ts.isFunctionLikeDeclaration(n);
143161
+ });
143162
+ return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : undefined;
143163
+ }
143142
143164
  if (ts.isStaticModifier(node) && ts.isClassStaticBlockDeclaration(node.parent)) {
143143
143165
  var classDecl = node.parent.parent;
143144
143166
  var _c = getSymbol(classDecl, typeChecker, stopAtAlias), symbol_1 = _c.symbol, failedAliasResolution_1 = _c.failedAliasResolution;
@@ -99,7 +99,7 @@ var ts;
99
99
  // The following is baselined as a literal template type without intervention
100
100
  /** The version of the TypeScript compiler release */
101
101
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
102
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221019");
102
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221021");
103
103
  /* @internal */
104
104
  var Comparison;
105
105
  (function (Comparison) {
@@ -42261,12 +42261,23 @@ var ts;
42261
42261
  }
42262
42262
  function writeConfigurations() {
42263
42263
  // Filter applicable options to place in the file
42264
- var categorizedOptions = ts.createMultiMap();
42264
+ var categorizedOptions = new ts.Map();
42265
+ // Set allowed categories in order
42266
+ categorizedOptions.set(ts.Diagnostics.Projects, []);
42267
+ categorizedOptions.set(ts.Diagnostics.Language_and_Environment, []);
42268
+ categorizedOptions.set(ts.Diagnostics.Modules, []);
42269
+ categorizedOptions.set(ts.Diagnostics.JavaScript_Support, []);
42270
+ categorizedOptions.set(ts.Diagnostics.Emit, []);
42271
+ categorizedOptions.set(ts.Diagnostics.Interop_Constraints, []);
42272
+ categorizedOptions.set(ts.Diagnostics.Type_Checking, []);
42273
+ categorizedOptions.set(ts.Diagnostics.Completeness, []);
42265
42274
  for (var _i = 0, optionDeclarations_1 = ts.optionDeclarations; _i < optionDeclarations_1.length; _i++) {
42266
42275
  var option = optionDeclarations_1[_i];
42267
- var category = option.category;
42268
42276
  if (isAllowedOptionForOutput(option)) {
42269
- categorizedOptions.add(ts.getLocaleSpecificMessage(category), option);
42277
+ var listForCategory = categorizedOptions.get(option.category);
42278
+ if (!listForCategory)
42279
+ categorizedOptions.set(option.category, listForCategory = []);
42280
+ listForCategory.push(option);
42270
42281
  }
42271
42282
  }
42272
42283
  // Serialize all options and their descriptions
@@ -42277,7 +42288,7 @@ var ts;
42277
42288
  if (entries.length !== 0) {
42278
42289
  entries.push({ value: "" });
42279
42290
  }
42280
- entries.push({ value: "/* ".concat(category, " */") });
42291
+ entries.push({ value: "/* ".concat(ts.getLocaleSpecificMessage(category), " */") });
42281
42292
  for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
42282
42293
  var option = options_1[_i];
42283
42294
  var optionName = void 0;
@@ -66992,7 +67003,7 @@ var ts;
66992
67003
  // For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
66993
67004
  if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
66994
67005
  var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
66995
- if (constraint && !(constraint.flags & 131072 /* TypeFlags.Never */) && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
67006
+ if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
66996
67007
  // TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
66997
67008
  result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
66998
67009
  }
@@ -68881,8 +68892,7 @@ var ts;
68881
68892
  return !!(type.flags & 109440 /* TypeFlags.Unit */);
68882
68893
  }
68883
68894
  function isUnitLikeType(type) {
68884
- return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.some(type.types, isUnitType) :
68885
- !!(type.flags & 109440 /* TypeFlags.Unit */);
68895
+ return isUnitType(getBaseConstraintOrType(type));
68886
68896
  }
68887
68897
  function extractUnitType(type) {
68888
68898
  return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
@@ -73055,13 +73065,13 @@ var ts;
73055
73065
  function markAliasReferenced(symbol, location) {
73056
73066
  if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
73057
73067
  var target = resolveAlias(symbol);
73058
- if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
73068
+ if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
73059
73069
  // An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
73060
73070
  // (because the const enum value will not be inlined), or if (2) the alias is an export
73061
73071
  // of a const enum declaration that will be preserved.
73062
73072
  if (compilerOptions.isolatedModules ||
73063
73073
  ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
73064
- !isConstEnumOrConstEnumOnlyModule(target)) {
73074
+ !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
73065
73075
  markAliasSymbolAsReferenced(symbol);
73066
73076
  }
73067
73077
  else {
@@ -73289,7 +73299,7 @@ var ts;
73289
73299
  // We only look for uninitialized variables in strict null checking mode, and only when we can analyze
73290
73300
  // the entire control flow graph from the variable's declaration (i.e. when the flow container and
73291
73301
  // declaration container are the same).
73292
- var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || ts.isBindingElement(declaration) ||
73302
+ var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) ||
73293
73303
  type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* TypeFlags.AnyOrUnknown */ | 16384 /* TypeFlags.Void */)) !== 0 ||
73294
73304
  isInTypeQuery(node) || node.parent.kind === 278 /* SyntaxKind.ExportSpecifier */) ||
73295
73305
  node.parent.kind === 232 /* SyntaxKind.NonNullExpression */ ||
@@ -73318,6 +73328,12 @@ var ts;
73318
73328
  }
73319
73329
  return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
73320
73330
  }
73331
+ function isSameScopedBindingElement(node, declaration) {
73332
+ if (ts.isBindingElement(declaration)) {
73333
+ var bindingElement = ts.findAncestor(node, ts.isBindingElement);
73334
+ return bindingElement && ts.getRootDeclaration(bindingElement) === ts.getRootDeclaration(declaration);
73335
+ }
73336
+ }
73321
73337
  function shouldMarkIdentifierAliasReferenced(node) {
73322
73338
  var _a;
73323
73339
  var parent = node.parent;
@@ -143139,6 +143155,12 @@ var ts;
143139
143155
  var label = ts.getTargetLabel(node.parent, node.text);
143140
143156
  return label ? [createDefinitionInfoFromName(typeChecker, label, "label" /* ScriptElementKind.label */, node.text, /*containerName*/ undefined)] : undefined; // TODO: GH#18217
143141
143157
  }
143158
+ if (node.kind === 105 /* SyntaxKind.ReturnKeyword */) {
143159
+ var functionDeclaration = ts.findAncestor(node.parent, function (n) {
143160
+ return ts.isClassStaticBlockDeclaration(n) ? "quit" : ts.isFunctionLikeDeclaration(n);
143161
+ });
143162
+ return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : undefined;
143163
+ }
143142
143164
  if (ts.isStaticModifier(node) && ts.isClassStaticBlockDeclaration(node.parent)) {
143143
143165
  var classDecl = node.parent.parent;
143144
143166
  var _c = getSymbol(classDecl, typeChecker, stopAtAlias), symbol_1 = _c.symbol, failedAliasResolution_1 = _c.failedAliasResolution;
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221019");
92
+ ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20221021");
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -42251,12 +42251,23 @@ var ts;
42251
42251
  }
42252
42252
  function writeConfigurations() {
42253
42253
  // Filter applicable options to place in the file
42254
- var categorizedOptions = ts.createMultiMap();
42254
+ var categorizedOptions = new ts.Map();
42255
+ // Set allowed categories in order
42256
+ categorizedOptions.set(ts.Diagnostics.Projects, []);
42257
+ categorizedOptions.set(ts.Diagnostics.Language_and_Environment, []);
42258
+ categorizedOptions.set(ts.Diagnostics.Modules, []);
42259
+ categorizedOptions.set(ts.Diagnostics.JavaScript_Support, []);
42260
+ categorizedOptions.set(ts.Diagnostics.Emit, []);
42261
+ categorizedOptions.set(ts.Diagnostics.Interop_Constraints, []);
42262
+ categorizedOptions.set(ts.Diagnostics.Type_Checking, []);
42263
+ categorizedOptions.set(ts.Diagnostics.Completeness, []);
42255
42264
  for (var _i = 0, optionDeclarations_1 = ts.optionDeclarations; _i < optionDeclarations_1.length; _i++) {
42256
42265
  var option = optionDeclarations_1[_i];
42257
- var category = option.category;
42258
42266
  if (isAllowedOptionForOutput(option)) {
42259
- categorizedOptions.add(ts.getLocaleSpecificMessage(category), option);
42267
+ var listForCategory = categorizedOptions.get(option.category);
42268
+ if (!listForCategory)
42269
+ categorizedOptions.set(option.category, listForCategory = []);
42270
+ listForCategory.push(option);
42260
42271
  }
42261
42272
  }
42262
42273
  // Serialize all options and their descriptions
@@ -42267,7 +42278,7 @@ var ts;
42267
42278
  if (entries.length !== 0) {
42268
42279
  entries.push({ value: "" });
42269
42280
  }
42270
- entries.push({ value: "/* ".concat(category, " */") });
42281
+ entries.push({ value: "/* ".concat(ts.getLocaleSpecificMessage(category), " */") });
42271
42282
  for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
42272
42283
  var option = options_1[_i];
42273
42284
  var optionName = void 0;
@@ -66982,7 +66993,7 @@ var ts;
66982
66993
  // For example, if `T extends 1 | 2` and `U extends 2 | 3` and we compare `T & U` to `T & U & (1 | 2 | 3)`
66983
66994
  if (!result && (source.flags & 2097152 /* TypeFlags.Intersection */ || source.flags & 262144 /* TypeFlags.TypeParameter */ && target.flags & 1048576 /* TypeFlags.Union */)) {
66984
66995
  var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 /* TypeFlags.Intersection */ ? source.types : [source], !!(target.flags & 1048576 /* TypeFlags.Union */));
66985
- if (constraint && !(constraint.flags & 131072 /* TypeFlags.Never */) && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
66996
+ if (constraint && everyType(constraint, function (c) { return c !== source; })) { // Skip comparison if expansion contains the source itself
66986
66997
  // TODO: Stack errors so we get a pyramid for the "normal" comparison above, _and_ a second for this
66987
66998
  result = isRelatedTo(constraint, target, 1 /* RecursionFlags.Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState);
66988
66999
  }
@@ -68871,8 +68882,7 @@ var ts;
68871
68882
  return !!(type.flags & 109440 /* TypeFlags.Unit */);
68872
68883
  }
68873
68884
  function isUnitLikeType(type) {
68874
- return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.some(type.types, isUnitType) :
68875
- !!(type.flags & 109440 /* TypeFlags.Unit */);
68885
+ return isUnitType(getBaseConstraintOrType(type));
68876
68886
  }
68877
68887
  function extractUnitType(type) {
68878
68888
  return type.flags & 2097152 /* TypeFlags.Intersection */ ? ts.find(type.types, isUnitType) || type : type;
@@ -73045,13 +73055,13 @@ var ts;
73045
73055
  function markAliasReferenced(symbol, location) {
73046
73056
  if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* SymbolFlags.Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* SymbolFlags.Value */)) {
73047
73057
  var target = resolveAlias(symbol);
73048
- if (getAllSymbolFlags(target) & 111551 /* SymbolFlags.Value */) {
73058
+ if (getAllSymbolFlags(target) & (111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */)) {
73049
73059
  // An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled
73050
73060
  // (because the const enum value will not be inlined), or if (2) the alias is an export
73051
73061
  // of a const enum declaration that will be preserved.
73052
73062
  if (compilerOptions.isolatedModules ||
73053
73063
  ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) ||
73054
- !isConstEnumOrConstEnumOnlyModule(target)) {
73064
+ !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) {
73055
73065
  markAliasSymbolAsReferenced(symbol);
73056
73066
  }
73057
73067
  else {
@@ -73279,7 +73289,7 @@ var ts;
73279
73289
  // We only look for uninitialized variables in strict null checking mode, and only when we can analyze
73280
73290
  // the entire control flow graph from the variable's declaration (i.e. when the flow container and
73281
73291
  // declaration container are the same).
73282
- var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || ts.isBindingElement(declaration) ||
73292
+ var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) ||
73283
73293
  type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* TypeFlags.AnyOrUnknown */ | 16384 /* TypeFlags.Void */)) !== 0 ||
73284
73294
  isInTypeQuery(node) || node.parent.kind === 278 /* SyntaxKind.ExportSpecifier */) ||
73285
73295
  node.parent.kind === 232 /* SyntaxKind.NonNullExpression */ ||
@@ -73308,6 +73318,12 @@ var ts;
73308
73318
  }
73309
73319
  return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
73310
73320
  }
73321
+ function isSameScopedBindingElement(node, declaration) {
73322
+ if (ts.isBindingElement(declaration)) {
73323
+ var bindingElement = ts.findAncestor(node, ts.isBindingElement);
73324
+ return bindingElement && ts.getRootDeclaration(bindingElement) === ts.getRootDeclaration(declaration);
73325
+ }
73326
+ }
73311
73327
  function shouldMarkIdentifierAliasReferenced(node) {
73312
73328
  var _a;
73313
73329
  var parent = node.parent;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.9.0-dev.20221019",
5
+ "version": "4.9.0-dev.20221021",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [