typescript 5.0.0-dev.20230110 → 5.0.0-dev.20230112

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.
@@ -42,7 +42,7 @@ var ts = (() => {
42
42
  "src/compiler/corePublic.ts"() {
43
43
  "use strict";
44
44
  versionMajorMinor = "5.0";
45
- version = `${versionMajorMinor}.0-dev.20230110`;
45
+ version = `${versionMajorMinor}.0-dev.20230112`;
46
46
  Comparison = /* @__PURE__ */ ((Comparison3) => {
47
47
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
48
48
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -8023,6 +8023,7 @@ ${lanes.join("\n")}
8023
8023
  Default_export_of_the_module_has_or_is_using_private_name_0: diag(4082, 1 /* Error */, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."),
8024
8024
  Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: diag(4083, 1 /* Error */, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."),
8025
8025
  Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: diag(4084, 1 /* Error */, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."),
8026
+ Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1: diag(4085, 1 /* Error */, "Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085", "Extends clause for inferred type '{0}' has or is using private name '{1}'."),
8026
8027
  Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: diag(4090, 1 /* Error */, "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."),
8027
8028
  Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4091, 1 /* Error */, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),
8028
8029
  Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4092, 1 /* Error */, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),
@@ -9526,7 +9527,8 @@ ${lanes.join("\n")}
9526
9527
  return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion);
9527
9528
  }
9528
9529
  function isIdentifierPart(ch, languageVersion, identifierVariant) {
9529
- return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || (identifierVariant === 1 /* JSX */ ? ch === 45 /* minus */ || ch === 58 /* colon */ : false) || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion);
9530
+ return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || // "-" and ":" are valid in JSX Identifiers
9531
+ (identifierVariant === 1 /* JSX */ ? ch === 45 /* minus */ || ch === 58 /* colon */ : false) || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion);
9530
9532
  }
9531
9533
  function isIdentifierText(name, languageVersion, identifierVariant) {
9532
9534
  let ch = codePointAt(name, 0);
@@ -18397,6 +18399,10 @@ ${lanes.join("\n")}
18397
18399
  return false;
18398
18400
  }
18399
18401
  }
18402
+ function isNonNullAccess(node) {
18403
+ const kind = node.kind;
18404
+ return (kind === 208 /* PropertyAccessExpression */ || kind === 209 /* ElementAccessExpression */) && isNonNullExpression(node.expression);
18405
+ }
18400
18406
  var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashAMDReferencePathRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, AccessKind, objectAllocator, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
18401
18407
  var init_utilities = __esm({
18402
18408
  "src/compiler/utilities.ts"() {
@@ -34986,7 +34992,8 @@ ${lanes.join("\n")}
34986
34992
  if (returnValue) {
34987
34993
  result[keyText] = value;
34988
34994
  }
34989
- if (jsonConversionNotifier && (parentOption || isRootOptionMap(knownOptions))) {
34995
+ if (jsonConversionNotifier && // Current callbacks are only on known parent option or if we are setting values in the root
34996
+ (parentOption || isRootOptionMap(knownOptions))) {
34990
34997
  const isValidOptionValue = isCompilerOptionsValue(option, value);
34991
34998
  if (parentOption) {
34992
34999
  if (isValidOptionValue) {
@@ -38031,7 +38038,8 @@ ${lanes.join("\n")}
38031
38038
  conditions,
38032
38039
  requestContainingDirectory: containingDirectory,
38033
38040
  reportDiagnostic: (diag2) => void diagnostics.push(diag2),
38034
- isConfigLookup: false
38041
+ isConfigLookup: false,
38042
+ candidateIsFromPackageJsonField: false
38035
38043
  };
38036
38044
  let resolved = primaryLookup();
38037
38045
  let primary = true;
@@ -38889,7 +38897,8 @@ ${lanes.join("\n")}
38889
38897
  conditions,
38890
38898
  requestContainingDirectory: containingDirectory,
38891
38899
  reportDiagnostic: (diag2) => void diagnostics.push(diag2),
38892
- isConfigLookup
38900
+ isConfigLookup,
38901
+ candidateIsFromPackageJsonField: false
38893
38902
  };
38894
38903
  if (traceEnabled && getEmitModuleResolutionKind(compilerOptions) >= 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) <= 99 /* NodeNext */) {
38895
38904
  trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
@@ -39112,7 +39121,7 @@ ${lanes.join("\n")}
39112
39121
  }
39113
39122
  function tryExtension(ext, resolvedUsingTsExtension) {
39114
39123
  const path = tryFile(candidate + ext, onlyRecordFailures, state);
39115
- return path === void 0 ? void 0 : { path, ext, resolvedUsingTsExtension };
39124
+ return path === void 0 ? void 0 : { path, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };
39116
39125
  }
39117
39126
  }
39118
39127
  function tryFile(fileName, onlyRecordFailures, state) {
@@ -39259,7 +39268,8 @@ ${lanes.join("\n")}
39259
39268
  conditions: emptyArray,
39260
39269
  requestContainingDirectory: void 0,
39261
39270
  reportDiagnostic: noop,
39262
- isConfigLookup: false
39271
+ isConfigLookup: false,
39272
+ candidateIsFromPackageJsonField: false
39263
39273
  };
39264
39274
  }
39265
39275
  function getPackageScopeForPath(fileName, state) {
@@ -39347,6 +39357,8 @@ ${lanes.join("\n")}
39347
39357
  }
39348
39358
  const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;
39349
39359
  const features = state2.features;
39360
+ const candidateIsFromPackageJsonField = state2.candidateIsFromPackageJsonField;
39361
+ state2.candidateIsFromPackageJsonField = true;
39350
39362
  if ((jsonContent == null ? void 0 : jsonContent.type) !== "module") {
39351
39363
  state2.features &= ~32 /* EsmMode */;
39352
39364
  }
@@ -39359,6 +39371,7 @@ ${lanes.join("\n")}
39359
39371
  false
39360
39372
  );
39361
39373
  state2.features = features;
39374
+ state2.candidateIsFromPackageJsonField = candidateIsFromPackageJsonField;
39362
39375
  return result;
39363
39376
  };
39364
39377
  const onlyRecordFailuresForPackageFile = packageFile ? !directoryProbablyExists(getDirectoryPath(packageFile), state.host) : void 0;
@@ -39432,7 +39445,10 @@ ${lanes.join("\n")}
39432
39445
  return void 0;
39433
39446
  }
39434
39447
  const trailingParts = parts.slice(nameParts.length);
39435
- return loadModuleFromExports(scope, extensions, !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`, state, cache, redirectedReference);
39448
+ const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`;
39449
+ const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
39450
+ const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
39451
+ return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference);
39436
39452
  }
39437
39453
  function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
39438
39454
  if (!scope.contents.packageJsonContent.exports) {
@@ -39934,25 +39950,26 @@ ${lanes.join("\n")}
39934
39950
  }
39935
39951
  }
39936
39952
  function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) {
39937
- var _a2;
39953
+ var _a2, _b, _c;
39938
39954
  const candidate = normalizePath(combinePaths(nodeModulesDirectory, moduleName));
39955
+ const { packageName, rest } = parsePackageName(moduleName);
39956
+ const packageDirectory = combinePaths(nodeModulesDirectory, packageName);
39957
+ let rootPackageInfo;
39939
39958
  let packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state);
39940
- if (!(state.features & 8 /* Exports */)) {
39941
- if (packageInfo) {
39942
- const fromFile = loadModuleFromFile(extensions, candidate, !nodeModulesDirectoryExists, state);
39943
- if (fromFile) {
39944
- return noPackageId(fromFile);
39945
- }
39946
- const fromDirectory = loadNodeModuleFromDirectoryWorker(
39947
- extensions,
39948
- candidate,
39949
- !nodeModulesDirectoryExists,
39950
- state,
39951
- packageInfo.contents.packageJsonContent,
39952
- getVersionPathsOfPackageJsonInfo(packageInfo, state)
39953
- );
39954
- return withPackageId(packageInfo, fromDirectory);
39959
+ if (rest !== "" && packageInfo && (!(state.features & 8 /* Exports */) || !hasProperty((_b = (_a2 = rootPackageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state)) == null ? void 0 : _a2.contents.packageJsonContent) != null ? _b : emptyArray, "exports"))) {
39960
+ const fromFile = loadModuleFromFile(extensions, candidate, !nodeModulesDirectoryExists, state);
39961
+ if (fromFile) {
39962
+ return noPackageId(fromFile);
39955
39963
  }
39964
+ const fromDirectory = loadNodeModuleFromDirectoryWorker(
39965
+ extensions,
39966
+ candidate,
39967
+ !nodeModulesDirectoryExists,
39968
+ state,
39969
+ packageInfo.contents.packageJsonContent,
39970
+ getVersionPathsOfPackageJsonInfo(packageInfo, state)
39971
+ );
39972
+ return withPackageId(packageInfo, fromDirectory);
39956
39973
  }
39957
39974
  const loader = (extensions2, candidate2, onlyRecordFailures, state2) => {
39958
39975
  let pathAndExtension = loadModuleFromFile(extensions2, candidate2, onlyRecordFailures, state2) || loadNodeModuleFromDirectoryWorker(
@@ -39968,13 +39985,11 @@ ${lanes.join("\n")}
39968
39985
  }
39969
39986
  return withPackageId(packageInfo, pathAndExtension);
39970
39987
  };
39971
- const { packageName, rest } = parsePackageName(moduleName);
39972
- const packageDirectory = combinePaths(nodeModulesDirectory, packageName);
39973
39988
  if (rest !== "") {
39974
- packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
39989
+ packageInfo = rootPackageInfo != null ? rootPackageInfo : getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
39975
39990
  }
39976
39991
  if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & 8 /* Exports */) {
39977
- return (_a2 = loadModuleFromExports(packageInfo, extensions, combinePaths(".", rest), state, cache, redirectedReference)) == null ? void 0 : _a2.value;
39992
+ return (_c = loadModuleFromExports(packageInfo, extensions, combinePaths(".", rest), state, cache, redirectedReference)) == null ? void 0 : _c.value;
39978
39993
  }
39979
39994
  const versionPaths = rest !== "" && packageInfo ? getVersionPathsOfPackageJsonInfo(packageInfo, state) : void 0;
39980
39995
  if (versionPaths) {
@@ -40090,7 +40105,8 @@ ${lanes.join("\n")}
40090
40105
  conditions: [],
40091
40106
  requestContainingDirectory: containingDirectory,
40092
40107
  reportDiagnostic: (diag2) => void diagnostics.push(diag2),
40093
- isConfigLookup: false
40108
+ isConfigLookup: false,
40109
+ candidateIsFromPackageJsonField: false
40094
40110
  };
40095
40111
  const resolved = tryResolve(1 /* TypeScript */ | 4 /* Declaration */) || tryResolve(2 /* JavaScript */ | (compilerOptions.resolveJsonModule ? 8 /* Json */ : 0));
40096
40112
  return createResolvedModuleWithFailedLookupLocations(
@@ -40169,7 +40185,8 @@ ${lanes.join("\n")}
40169
40185
  conditions: [],
40170
40186
  requestContainingDirectory: void 0,
40171
40187
  reportDiagnostic: (diag2) => void diagnostics.push(diag2),
40172
- isConfigLookup: false
40188
+ isConfigLookup: false,
40189
+ candidateIsFromPackageJsonField: false
40173
40190
  };
40174
40191
  const resolved = loadModuleFromImmediateNodeModulesDirectory(
40175
40192
  4 /* Declaration */,
@@ -42952,8 +42969,12 @@ ${lanes.join("\n")}
42952
42969
  return false;
42953
42970
  }
42954
42971
  if (currentFlow === unreachableFlow) {
42955
- const reportError = isStatementButNotDeclaration(node) && node.kind !== 239 /* EmptyStatement */ || // report error on class declarations
42956
- node.kind === 260 /* ClassDeclaration */ || node.kind === 264 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node);
42972
+ const reportError = (
42973
+ // report error on all statements except empty ones
42974
+ isStatementButNotDeclaration(node) && node.kind !== 239 /* EmptyStatement */ || // report error on class declarations
42975
+ node.kind === 260 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set
42976
+ node.kind === 264 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node)
42977
+ );
42957
42978
  if (reportError) {
42958
42979
  currentFlow = reportedUnreachableFlow;
42959
42980
  if (!options.allowUnreachableCode) {
@@ -48716,7 +48737,8 @@ ${lanes.join("\n")}
48716
48737
  const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol
48717
48738
  forEach(symbol.declarations, (declaration) => declaration.parent.kind === 308 /* SourceFile */ || declaration.parent.kind === 265 /* ModuleBlock */));
48718
48739
  if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
48719
- return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a4 = context.visitedTypes) == null ? void 0 : _a4.has(typeId))) && (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration));
48740
+ return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a4 = context.visitedTypes) == null ? void 0 : _a4.has(typeId))) && // it is type of the symbol uses itself recursively
48741
+ (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration));
48720
48742
  }
48721
48743
  }
48722
48744
  }
@@ -48808,7 +48830,9 @@ ${lanes.join("\n")}
48808
48830
  const abstractSignatures = filter(resolved.constructSignatures, (signature) => !!(signature.flags & 4 /* Abstract */));
48809
48831
  if (some(abstractSignatures)) {
48810
48832
  const types = map(abstractSignatures, getOrCreateTypeFromSignature);
48811
- const typeElementCount = resolved.callSignatures.length + (resolved.constructSignatures.length - abstractSignatures.length) + resolved.indexInfos.length + (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ ? countWhere(resolved.properties, (p) => !(p.flags & 4194304 /* Prototype */)) : length(resolved.properties));
48833
+ const typeElementCount = resolved.callSignatures.length + (resolved.constructSignatures.length - abstractSignatures.length) + resolved.indexInfos.length + // exclude `prototype` when writing a class expression as a type literal, as per
48834
+ // the logic in `createTypeNodesFromResolvedType`.
48835
+ (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ ? countWhere(resolved.properties, (p) => !(p.flags & 4194304 /* Prototype */)) : length(resolved.properties));
48812
48836
  if (typeElementCount) {
48813
48837
  types.push(getResolvedTypeWithoutAbstractConstructSignatures(resolved));
48814
48838
  }
@@ -49470,9 +49494,11 @@ ${lanes.join("\n")}
49470
49494
  if (accessibleSymbolChain) {
49471
49495
  return accessibleSymbolChain;
49472
49496
  }
49473
- if (// If this is the last part of outputting the symbol, always output. The cases apply only to parent symbols.
49474
- endOfChain || // If a parent symbol is an anonymous type, don't write it.
49475
- !(symbol2.flags & (2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */))) {
49497
+ if (
49498
+ // If this is the last part of outputting the symbol, always output. The cases apply only to parent symbols.
49499
+ endOfChain || // If a parent symbol is an anonymous type, don't write it.
49500
+ !(symbol2.flags & (2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */))
49501
+ ) {
49476
49502
  if (!endOfChain && !yieldModuleSymbol && !!forEach(symbol2.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
49477
49503
  return;
49478
49504
  }
@@ -50094,7 +50120,8 @@ ${lanes.join("\n")}
50094
50120
  }
50095
50121
  if (isLiteralImportTypeNode(node)) {
50096
50122
  const nodeSymbol = getNodeLinks(node).resolvedSymbol;
50097
- if (isInJSDoc(node) && nodeSymbol && (!node.isTypeOf && !(nodeSymbol.flags & 788968 /* Type */) || // The import type had type arguments autofilled by js fallback logic
50123
+ if (isInJSDoc(node) && nodeSymbol && // The import type resolved using jsdoc fallback logic
50124
+ (!node.isTypeOf && !(nodeSymbol.flags & 788968 /* Type */) || // The import type had type arguments autofilled by js fallback logic
50098
50125
  !(length(node.typeArguments) >= getMinTypeArgumentCount(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(nodeSymbol))))) {
50099
50126
  return setOriginalNode(typeToTypeNodeHelper(getTypeFromTypeNode(node), context), node);
50100
50127
  }
@@ -51611,8 +51638,10 @@ ${lanes.join("\n")}
51611
51638
  }
51612
51639
  }
51613
51640
  function getNameOfSymbolAsWritten(symbol, context) {
51614
- if (context && symbol.escapedName === "default" /* Default */ && !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */) && (!(context.flags & 16777216 /* InInitialEntityName */) || // if the symbol is synthesized, it will only be referenced externally it must print as `default`
51615
- !symbol.declarations || context.enclosingDeclaration && findAncestor(symbol.declarations[0], isDefaultBindingContext) !== findAncestor(context.enclosingDeclaration, isDefaultBindingContext))) {
51641
+ if (context && symbol.escapedName === "default" /* Default */ && !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */) && // If it's not the first part of an entity name, it must print as `default`
51642
+ (!(context.flags & 16777216 /* InInitialEntityName */) || // if the symbol is synthesized, it will only be referenced externally it must print as `default`
51643
+ !symbol.declarations || // if not in the same binding context (source file, module declaration), it must print as `default`
51644
+ context.enclosingDeclaration && findAncestor(symbol.declarations[0], isDefaultBindingContext) !== findAncestor(context.enclosingDeclaration, isDefaultBindingContext))) {
51616
51645
  return "default";
51617
51646
  }
51618
51647
  if (symbol.declarations && symbol.declarations.length) {
@@ -52939,7 +52968,10 @@ ${lanes.join("\n")}
52939
52968
  function getWriteTypeOfSymbol(symbol) {
52940
52969
  const checkFlags = getCheckFlags(symbol);
52941
52970
  if (symbol.flags & 4 /* Property */) {
52942
- return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : symbol.links.writeType || symbol.links.type : getTypeOfSymbol(symbol);
52971
+ return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : (
52972
+ // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty
52973
+ symbol.links.writeType || symbol.links.type
52974
+ ) : getTypeOfSymbol(symbol);
52943
52975
  }
52944
52976
  if (symbol.flags & 98304 /* Accessor */) {
52945
52977
  return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol);
@@ -53064,7 +53096,17 @@ ${lanes.join("\n")}
53064
53096
  }
53065
53097
  }
53066
53098
  function getOuterTypeParametersOfClassOrInterface(symbol) {
53067
- const declaration = symbol.flags & 32 /* Class */ ? symbol.valueDeclaration : getDeclarationOfKind(symbol, 261 /* InterfaceDeclaration */);
53099
+ var _a2;
53100
+ const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a2 = symbol.declarations) == null ? void 0 : _a2.find((decl) => {
53101
+ if (decl.kind === 261 /* InterfaceDeclaration */) {
53102
+ return true;
53103
+ }
53104
+ if (decl.kind !== 257 /* VariableDeclaration */) {
53105
+ return false;
53106
+ }
53107
+ const initializer = decl.initializer;
53108
+ return !!initializer && (initializer.kind === 215 /* FunctionExpression */ || initializer.kind === 216 /* ArrowFunction */);
53109
+ });
53068
53110
  Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations");
53069
53111
  return getOuterTypeParameters(declaration);
53070
53112
  }
@@ -61346,7 +61388,11 @@ ${lanes.join("\n")}
61346
61388
  if (variances === emptyArray) {
61347
61389
  return 1 /* Unknown */;
61348
61390
  }
61349
- const varianceResult = relateVariances(source2.aliasTypeArguments, target2.aliasTypeArguments, variances, intersectionState);
61391
+ const params = getSymbolLinks(source2.aliasSymbol).typeParameters;
61392
+ const minParams = getMinTypeArgumentCount(params);
61393
+ const sourceTypes = fillMissingTypeArguments(source2.aliasTypeArguments, params, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration));
61394
+ const targetTypes = fillMissingTypeArguments(target2.aliasTypeArguments, params, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration));
61395
+ const varianceResult = relateVariances(sourceTypes, targetTypes, variances, intersectionState);
61350
61396
  if (varianceResult !== void 0) {
61351
61397
  return varianceResult;
61352
61398
  }
@@ -63803,7 +63849,11 @@ ${lanes.join("\n")}
63803
63849
  }
63804
63850
  if (source.aliasSymbol && source.aliasSymbol === target.aliasSymbol) {
63805
63851
  if (source.aliasTypeArguments) {
63806
- inferFromTypeArguments(source.aliasTypeArguments, target.aliasTypeArguments, getAliasVariances(source.aliasSymbol));
63852
+ const params = getSymbolLinks(source.aliasSymbol).typeParameters;
63853
+ const minParams = getMinTypeArgumentCount(params);
63854
+ const sourceTypes = fillMissingTypeArguments(source.aliasTypeArguments, params, minParams, isInJSFile(source.aliasSymbol.valueDeclaration));
63855
+ const targetTypes = fillMissingTypeArguments(target.aliasTypeArguments, params, minParams, isInJSFile(source.aliasSymbol.valueDeclaration));
63856
+ inferFromTypeArguments(sourceTypes, targetTypes, getAliasVariances(source.aliasSymbol));
63807
63857
  }
63808
63858
  return;
63809
63859
  }
@@ -64409,7 +64459,7 @@ ${lanes.join("\n")}
64409
64459
  if (signature) {
64410
64460
  const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : void 0;
64411
64461
  if (inference.contraCandidates) {
64412
- const useCovariantType = inferredCovariantType && !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other === inference || getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType)));
64462
+ const useCovariantType = inferredCovariantType && !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType)));
64413
64463
  inferredType = useCovariantType ? inferredCovariantType : getContravariantInference(inference);
64414
64464
  } else if (inferredCovariantType) {
64415
64465
  inferredType = inferredCovariantType;
@@ -65885,12 +65935,13 @@ ${lanes.join("\n")}
65885
65935
  if (propName === void 0) {
65886
65936
  return type;
65887
65937
  }
65888
- const removeNullable = strictNullChecks && isOptionalChain(access) && maybeTypeOfKind(type, 98304 /* Nullable */);
65938
+ const optionalChain = isOptionalChain(access);
65939
+ const removeNullable = strictNullChecks && (optionalChain || isNonNullAccess(access)) && maybeTypeOfKind(type, 98304 /* Nullable */);
65889
65940
  let propType = getTypeOfPropertyOfType(removeNullable ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type, propName);
65890
65941
  if (!propType) {
65891
65942
  return type;
65892
65943
  }
65893
- propType = removeNullable ? getOptionalType(propType) : propType;
65944
+ propType = removeNullable && optionalChain ? getOptionalType(propType) : propType;
65894
65945
  const narrowedPropType = narrowType2(propType);
65895
65946
  return filterType(type, (t) => {
65896
65947
  const discriminantType = getTypeOfPropertyOrIndexSignature(t, propName);
@@ -66209,18 +66260,20 @@ ${lanes.join("\n")}
66209
66260
  return narrowTypeByTypeFacts(type, nonPrimitiveType, 128 /* TypeofEQHostObject */);
66210
66261
  }
66211
66262
  function narrowTypeByTypeFacts(type, impliedType, facts) {
66212
- return mapType(type, (t) => // We first check if a constituent is a subtype of the implied type. If so, we either keep or eliminate
66213
- // the constituent based on its type facts. We use the strict subtype relation because it treats `object`
66214
- // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`,
66215
- // but are classified as "function" according to `typeof`.
66216
- isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? getTypeFacts(t) & facts ? t : neverType : (
66217
- // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied
66218
- // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`.
66219
- isTypeSubtypeOf(impliedType, t) ? impliedType : (
66220
- // Neither the constituent nor the implied type is a subtype of the other, however their domains may still
66221
- // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate
66222
- // possible overlap, we form an intersection. Otherwise, we eliminate the constituent.
66223
- getTypeFacts(t) & facts ? getIntersectionType([t, impliedType]) : neverType
66263
+ return mapType(type, (t) => (
66264
+ // We first check if a constituent is a subtype of the implied type. If so, we either keep or eliminate
66265
+ // the constituent based on its type facts. We use the strict subtype relation because it treats `object`
66266
+ // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`,
66267
+ // but are classified as "function" according to `typeof`.
66268
+ isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? getTypeFacts(t) & facts ? t : neverType : (
66269
+ // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied
66270
+ // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`.
66271
+ isTypeSubtypeOf(impliedType, t) ? impliedType : (
66272
+ // Neither the constituent nor the implied type is a subtype of the other, however their domains may still
66273
+ // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate
66274
+ // possible overlap, we form an intersection. Otherwise, we eliminate the constituent.
66275
+ getTypeFacts(t) & facts ? getIntersectionType([t, impliedType]) : neverType
66276
+ )
66224
66277
  )
66225
66278
  ));
66226
66279
  }
@@ -73791,7 +73844,8 @@ ${lanes.join("\n")}
73791
73844
  }
73792
73845
  }
73793
73846
  function isIndirectCall(node) {
73794
- return node.parent.kind === 214 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 212 /* TaggedTemplateExpression */) && (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval");
73847
+ return node.parent.kind === 214 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 212 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior.
73848
+ (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval");
73795
73849
  }
73796
73850
  function checkForDisallowedESSymbolOperand(operator2) {
73797
73851
  const offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint(leftType, 12288 /* ESSymbolLike */) ? left : maybeTypeOfKindConsideringBaseConstraint(rightType, 12288 /* ESSymbolLike */) ? right : void 0;
@@ -80876,7 +80930,12 @@ ${lanes.join("\n")}
80876
80930
  return false;
80877
80931
  const symbol = getSymbolOfDeclaration(node);
80878
80932
  const signaturesOfSymbol = getSignaturesOfSymbol(symbol);
80879
- return signaturesOfSymbol.length > 1 || signaturesOfSymbol.length === 1 && signaturesOfSymbol[0].declaration !== node;
80933
+ return signaturesOfSymbol.length > 1 || // If there is single signature for the symbol, it is overload if that signature isn't coming from the node
80934
+ // e.g.: function foo(a: string): string;
80935
+ // function foo(a: any) { // This is implementation of the overloads
80936
+ // return a;
80937
+ // }
80938
+ signaturesOfSymbol.length === 1 && signaturesOfSymbol[0].declaration !== node;
80880
80939
  }
80881
80940
  return false;
80882
80941
  }
@@ -102777,6 +102836,9 @@ ${lanes.join("\n")}
102777
102836
  case 259 /* FunctionDeclaration */:
102778
102837
  diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;
102779
102838
  break;
102839
+ case 192 /* InferType */:
102840
+ diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1;
102841
+ break;
102780
102842
  case 262 /* TypeAliasDeclaration */:
102781
102843
  diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;
102782
102844
  break;
@@ -111731,7 +111793,8 @@ ${lanes.join("\n")}
111731
111793
  const oldSourceFiles = oldProgram.getSourceFiles();
111732
111794
  for (const oldSourceFile of oldSourceFiles) {
111733
111795
  const newFile = getSourceFileByPath(oldSourceFile.resolvedPath);
111734
- if (shouldCreateNewSourceFile || !newFile || newFile.impliedNodeFormat !== oldSourceFile.impliedNodeFormat || oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path) {
111796
+ if (shouldCreateNewSourceFile || !newFile || newFile.impliedNodeFormat !== oldSourceFile.impliedNodeFormat || // old file wasn't redirect but new file is
111797
+ oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path) {
111735
111798
  host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path));
111736
111799
  }
111737
111800
  }
@@ -116617,7 +116680,8 @@ ${lanes.join("\n")}
116617
116680
  const name = loader.nameAndMode.getName(entry);
116618
116681
  const mode = loader.nameAndMode.getMode(entry, containingSourceFile);
116619
116682
  let resolution = resolutionsInFile.get(name, mode);
116620
- if (!seenNamesInFile.has(name, mode) && unmatchedRedirects || !resolution || resolution.isInvalidated || hasInvalidatedNonRelativeUnresolvedImport && !isExternalModuleNameRelative(name) && shouldRetryResolution(resolution)) {
116683
+ if (!seenNamesInFile.has(name, mode) && unmatchedRedirects || !resolution || resolution.isInvalidated || // If the name is unresolved import that was invalidated, recalculate
116684
+ hasInvalidatedNonRelativeUnresolvedImport && !isExternalModuleNameRelative(name) && shouldRetryResolution(resolution)) {
116621
116685
  const existingResolution = resolution;
116622
116686
  resolution = loader.resolve(name, mode);
116623
116687
  if (resolutionHost.onDiscoveredSymlink && resolutionIsSymlink(resolution)) {
@@ -122276,7 +122340,11 @@ ${lanes.join("\n")}
122276
122340
  return n;
122277
122341
  }
122278
122342
  return firstDefined(n.getChildren(sourceFile), (child) => {
122279
- const shouldDiveInChildNode = child.pos <= previousToken.pos && child.end > previousToken.end || child.pos === previousToken.end;
122343
+ const shouldDiveInChildNode = (
122344
+ // previous token is enclosed somewhere in the child
122345
+ child.pos <= previousToken.pos && child.end > previousToken.end || // previous token ends exactly at the beginning of child
122346
+ child.pos === previousToken.end
122347
+ );
122280
122348
  return shouldDiveInChildNode && nodeHasTokens(child, sourceFile) ? find2(child) : void 0;
122281
122349
  });
122282
122350
  }
@@ -135947,15 +136015,17 @@ ${lanes.join("\n")}
135947
136015
  return fixes[0];
135948
136016
  }
135949
136017
  return fixes.reduce(
135950
- (best, fix) => // Takes true branch of conditional if `fix` is better than `best`
135951
- compareModuleSpecifiers(
135952
- fix,
135953
- best,
135954
- sourceFile,
135955
- program,
135956
- packageJsonImportFilter.allowsImportingSpecifier,
135957
- (fileName) => toPath(fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host))
135958
- ) === -1 /* LessThan */ ? fix : best
136018
+ (best, fix) => (
136019
+ // Takes true branch of conditional if `fix` is better than `best`
136020
+ compareModuleSpecifiers(
136021
+ fix,
136022
+ best,
136023
+ sourceFile,
136024
+ program,
136025
+ packageJsonImportFilter.allowsImportingSpecifier,
136026
+ (fileName) => toPath(fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host))
136027
+ ) === -1 /* LessThan */ ? fix : best
136028
+ )
135959
136029
  );
135960
136030
  }
135961
136031
  function compareModuleSpecifiers(a, b, importingFile, program, allowsImportingSpecifier, toPath3) {
@@ -145451,7 +145521,10 @@ ${lanes.join("\n")}
145451
145521
  return containingNodeKind === 257 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 240 /* VariableStatement */ || containingNodeKind === 263 /* EnumDeclaration */ || // enum a { foo, |
145452
145522
  isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 261 /* InterfaceDeclaration */ || // interface A<T, |
145453
145523
  containingNodeKind === 204 /* ArrayBindingPattern */ || // var [x, y|
145454
- containingNodeKind === 262 /* TypeAliasDeclaration */ || isClassLike(parent2) && !!parent2.typeParameters && parent2.typeParameters.end >= contextToken2.pos;
145524
+ containingNodeKind === 262 /* TypeAliasDeclaration */ || // type Map, K, |
145525
+ // class A<T, |
145526
+ // var C = class D<T, |
145527
+ isClassLike(parent2) && !!parent2.typeParameters && parent2.typeParameters.end >= contextToken2.pos;
145455
145528
  case 24 /* DotToken */:
145456
145529
  return containingNodeKind === 204 /* ArrayBindingPattern */;
145457
145530
  case 58 /* ColonToken */:
@@ -147468,8 +147541,10 @@ ${lanes.join("\n")}
147468
147541
  return map2;
147469
147542
  }
147470
147543
  function forEachPossibleImportOrExportStatement(sourceFileLike, action) {
147471
- return forEach(sourceFileLike.kind === 308 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => // TODO: GH#18217
147472
- action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action));
147544
+ return forEach(sourceFileLike.kind === 308 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => (
147545
+ // TODO: GH#18217
147546
+ action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action)
147547
+ ));
147473
147548
  }
147474
147549
  function forEachImport(sourceFile, action) {
147475
147550
  if (sourceFile.externalModuleIndicator || sourceFile.imports !== void 0) {
@@ -147738,7 +147813,9 @@ ${lanes.join("\n")}
147738
147813
  return propertyName ? getContextNode(propertyName.parent) : void 0;
147739
147814
  }
147740
147815
  if (node.parent.name === node || // node is name of declaration, use parent
147741
- isConstructorDeclaration(node.parent) || isExportAssignment(node.parent) || (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || node.kind === 88 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) {
147816
+ isConstructorDeclaration(node.parent) || isExportAssignment(node.parent) || // Property name of the import export specifier or binding pattern, use parent
147817
+ (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || // Is default export
147818
+ node.kind === 88 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) {
147742
147819
  return getContextNode(node.parent);
147743
147820
  }
147744
147821
  return void 0;
@@ -147792,11 +147869,13 @@ ${lanes.join("\n")}
147792
147869
  const checker = program.getTypeChecker();
147793
147870
  const adjustedNode = Core.getAdjustedNode(node, options);
147794
147871
  const symbol = isDefinitionForReference(adjustedNode) ? checker.getSymbolAtLocation(adjustedNode) : void 0;
147795
- return !referencedSymbols || !referencedSymbols.length ? void 0 : mapDefined(referencedSymbols, ({ definition, references }) => // Only include referenced symbols that have a valid definition.
147796
- definition && {
147797
- definition: checker.runWithCancellationToken(cancellationToken, (checker2) => definitionToReferencedSymbolDefinitionInfo(definition, checker2, node)),
147798
- references: references.map((r) => toReferencedSymbolEntry(r, symbol))
147799
- });
147872
+ return !referencedSymbols || !referencedSymbols.length ? void 0 : mapDefined(referencedSymbols, ({ definition, references }) => (
147873
+ // Only include referenced symbols that have a valid definition.
147874
+ definition && {
147875
+ definition: checker.runWithCancellationToken(cancellationToken, (checker2) => definitionToReferencedSymbolDefinitionInfo(definition, checker2, node)),
147876
+ references: references.map((r) => toReferencedSymbolEntry(r, symbol))
147877
+ }
147878
+ ));
147800
147879
  }
147801
147880
  function isDefinitionForReference(node) {
147802
147881
  return node.kind === 88 /* DefaultKeyword */ || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 135 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent);
@@ -148834,8 +148913,10 @@ ${lanes.join("\n")}
148834
148913
  function getLabelReferencesInNode(container, targetLabel) {
148835
148914
  const sourceFile = container.getSourceFile();
148836
148915
  const labelName = targetLabel.text;
148837
- const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, labelName, container), (node) => // Only pick labels that are either the target label, or have a target that is the target label
148838
- node === targetLabel || isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel ? nodeEntry(node) : void 0);
148916
+ const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, labelName, container), (node) => (
148917
+ // Only pick labels that are either the target label, or have a target that is the target label
148918
+ node === targetLabel || isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel ? nodeEntry(node) : void 0
148919
+ ));
148839
148920
  return [{ definition: { type: 1 /* Label */, node: targetLabel }, references }];
148840
148921
  }
148841
148922
  function isValidReferencePosition(node, searchSymbolName) {
@@ -157976,7 +158057,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
157976
158057
  hasAddedSymbolInfo = true;
157977
158058
  hasMultipleSignatures = allSignatures.length > 1;
157978
158059
  }
157979
- } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || location.kind === 135 /* ConstructorKeyword */ && location.parent.kind === 173 /* Constructor */) {
158060
+ } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration
158061
+ location.kind === 135 /* ConstructorKeyword */ && location.parent.kind === 173 /* Constructor */) {
157980
158062
  const functionDeclaration = location.parent;
157981
158063
  const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 135 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration));
157982
158064
  if (locationIsSymbolDeclaration) {
@@ -160314,18 +160396,12 @@ ${options.prefix}` : "\n" : options.prefix
160314
160396
  rule("NoSpaceBetweenCloseParenAndAngularBracket", 21 /* CloseParenToken */, 29 /* LessThanToken */, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */),
160315
160397
  rule("NoSpaceAfterOpenAngularBracket", 29 /* LessThanToken */, anyToken, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */),
160316
160398
  rule("NoSpaceBeforeCloseAngularBracket", anyToken, 31 /* GreaterThanToken */, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */),
160317
- rule(
160318
- "NoSpaceAfterCloseAngularBracket",
160319
- 31 /* GreaterThanToken */,
160320
- [20 /* OpenParenToken */, 22 /* OpenBracketToken */, 31 /* GreaterThanToken */, 27 /* CommaToken */],
160321
- [
160322
- isNonJsxSameLineTokenContext,
160323
- isTypeArgumentOrParameterOrAssertionContext,
160324
- isNotFunctionDeclContext
160325
- /*To prevent an interference with the SpaceBeforeOpenParenInFuncDecl rule*/
160326
- ],
160327
- 16 /* DeleteSpace */
160328
- ),
160399
+ rule("NoSpaceAfterCloseAngularBracket", 31 /* GreaterThanToken */, [20 /* OpenParenToken */, 22 /* OpenBracketToken */, 31 /* GreaterThanToken */, 27 /* CommaToken */], [
160400
+ isNonJsxSameLineTokenContext,
160401
+ isTypeArgumentOrParameterOrAssertionContext,
160402
+ isNotFunctionDeclContext,
160403
+ isNonTypeAssertionContext
160404
+ ], 16 /* DeleteSpace */),
160329
160405
  // decorators
160330
160406
  rule("SpaceBeforeAt", [21 /* CloseParenToken */, 79 /* Identifier */], 59 /* AtToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */),
160331
160407
  rule("NoSpaceAfterAt", 59 /* AtToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */),
@@ -160758,6 +160834,9 @@ ${options.prefix}` : "\n" : options.prefix
160758
160834
  function isTypeAssertionContext(context) {
160759
160835
  return context.contextNode.kind === 213 /* TypeAssertionExpression */;
160760
160836
  }
160837
+ function isNonTypeAssertionContext(context) {
160838
+ return !isTypeAssertionContext(context);
160839
+ }
160761
160840
  function isVoidOpContext(context) {
160762
160841
  return context.currentTokenSpan.kind === 114 /* VoidKeyword */ && context.currentTokenParent.kind === 219 /* VoidExpression */;
160763
160842
  }
@@ -169107,7 +169186,8 @@ ${options.prefix}` : "\n" : options.prefix
169107
169186
  });
169108
169187
  }
169109
169188
  getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) {
169110
- if (!this.useInferredProjectPerProjectRoot || info.isDynamic && projectRootPath === void 0) {
169189
+ if (!this.useInferredProjectPerProjectRoot || // Its a dynamic info opened without project root
169190
+ info.isDynamic && projectRootPath === void 0) {
169111
169191
  return void 0;
169112
169192
  }
169113
169193
  if (projectRootPath) {
@@ -176584,6 +176664,7 @@ ${e.message}`;
176584
176664
  isNonContextualKeyword: () => isNonContextualKeyword,
176585
176665
  isNonGlobalAmbientModule: () => isNonGlobalAmbientModule,
176586
176666
  isNonGlobalDeclaration: () => isNonGlobalDeclaration,
176667
+ isNonNullAccess: () => isNonNullAccess,
176587
176668
  isNonNullChain: () => isNonNullChain,
176588
176669
  isNonNullExpression: () => isNonNullExpression,
176589
176670
  isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName,
@@ -179224,6 +179305,7 @@ ${e.message}`;
179224
179305
  isNonContextualKeyword: () => isNonContextualKeyword,
179225
179306
  isNonGlobalAmbientModule: () => isNonGlobalAmbientModule,
179226
179307
  isNonGlobalDeclaration: () => isNonGlobalDeclaration,
179308
+ isNonNullAccess: () => isNonNullAccess,
179227
179309
  isNonNullChain: () => isNonNullChain,
179228
179310
  isNonNullExpression: () => isNonNullExpression,
179229
179311
  isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName,