@typescript-deploys/pr-build 5.3.0-pr-55727-2 → 5.3.0-pr-55386-10

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
@@ -1763,7 +1763,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1763
1763
  // for use with vscode-js-debug's new customDescriptionGenerator in launch.json
1764
1764
  __tsDebuggerDisplay: {
1765
1765
  value() {
1766
- const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}` : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
1766
+ const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
1767
1767
  const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
1768
1768
  return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`;
1769
1769
  }
@@ -17439,6 +17439,9 @@ function getPropertyNameFromType(type) {
17439
17439
  }
17440
17440
  return Debug.fail();
17441
17441
  }
17442
+ function isExpandoPropertyDeclaration(declaration) {
17443
+ return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration));
17444
+ }
17442
17445
 
17443
17446
  // src/compiler/factory/baseNodeFactory.ts
17444
17447
  function createBaseNodeFactory() {
@@ -43530,29 +43533,72 @@ function createTypeChecker(host) {
43530
43533
  var resolvingSymbol = createSymbol(0, "__resolving__" /* Resolving */);
43531
43534
  var unresolvedSymbols = /* @__PURE__ */ new Map();
43532
43535
  var errorTypes = /* @__PURE__ */ new Map();
43536
+ var seenIntrinsicNames = /* @__PURE__ */ new Set();
43533
43537
  var anyType = createIntrinsicType(1 /* Any */, "any");
43534
- var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */);
43535
- var wildcardType = createIntrinsicType(1 /* Any */, "any");
43536
- var blockedStringType = createIntrinsicType(1 /* Any */, "any");
43538
+ var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */, "auto");
43539
+ var wildcardType = createIntrinsicType(
43540
+ 1 /* Any */,
43541
+ "any",
43542
+ /*objectFlags*/
43543
+ void 0,
43544
+ "wildcard"
43545
+ );
43546
+ var blockedStringType = createIntrinsicType(
43547
+ 1 /* Any */,
43548
+ "any",
43549
+ /*objectFlags*/
43550
+ void 0,
43551
+ "blocked string"
43552
+ );
43537
43553
  var errorType = createIntrinsicType(1 /* Any */, "error");
43538
43554
  var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
43539
- var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */);
43555
+ var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable");
43540
43556
  var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic");
43541
43557
  var unknownType = createIntrinsicType(2 /* Unknown */, "unknown");
43542
- var nonNullUnknownType = createIntrinsicType(2 /* Unknown */, "unknown");
43558
+ var nonNullUnknownType = createIntrinsicType(
43559
+ 2 /* Unknown */,
43560
+ "unknown",
43561
+ /*objectFlags*/
43562
+ void 0,
43563
+ "non-null"
43564
+ );
43543
43565
  var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined");
43544
- var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */);
43545
- var missingType = createIntrinsicType(32768 /* Undefined */, "undefined");
43566
+ var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening");
43567
+ var missingType = createIntrinsicType(
43568
+ 32768 /* Undefined */,
43569
+ "undefined",
43570
+ /*objectFlags*/
43571
+ void 0,
43572
+ "missing"
43573
+ );
43546
43574
  var undefinedOrMissingType = exactOptionalPropertyTypes ? missingType : undefinedType;
43547
- var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined");
43575
+ var optionalType = createIntrinsicType(
43576
+ 32768 /* Undefined */,
43577
+ "undefined",
43578
+ /*objectFlags*/
43579
+ void 0,
43580
+ "optional"
43581
+ );
43548
43582
  var nullType = createIntrinsicType(65536 /* Null */, "null");
43549
- var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */);
43583
+ var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */, "widening");
43550
43584
  var stringType = createIntrinsicType(4 /* String */, "string");
43551
43585
  var numberType = createIntrinsicType(8 /* Number */, "number");
43552
43586
  var bigintType = createIntrinsicType(64 /* BigInt */, "bigint");
43553
- var falseType = createIntrinsicType(512 /* BooleanLiteral */, "false");
43587
+ var falseType = createIntrinsicType(
43588
+ 512 /* BooleanLiteral */,
43589
+ "false",
43590
+ /*objectFlags*/
43591
+ void 0,
43592
+ "fresh"
43593
+ );
43554
43594
  var regularFalseType = createIntrinsicType(512 /* BooleanLiteral */, "false");
43555
- var trueType = createIntrinsicType(512 /* BooleanLiteral */, "true");
43595
+ var trueType = createIntrinsicType(
43596
+ 512 /* BooleanLiteral */,
43597
+ "true",
43598
+ /*objectFlags*/
43599
+ void 0,
43600
+ "fresh"
43601
+ );
43556
43602
  var regularTrueType = createIntrinsicType(512 /* BooleanLiteral */, "true");
43557
43603
  trueType.regularType = regularTrueType;
43558
43604
  trueType.freshType = trueType;
@@ -43566,9 +43612,21 @@ function createTypeChecker(host) {
43566
43612
  var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, "symbol");
43567
43613
  var voidType = createIntrinsicType(16384 /* Void */, "void");
43568
43614
  var neverType = createIntrinsicType(131072 /* Never */, "never");
43569
- var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */);
43570
- var implicitNeverType = createIntrinsicType(131072 /* Never */, "never");
43571
- var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never");
43615
+ var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */, "silent");
43616
+ var implicitNeverType = createIntrinsicType(
43617
+ 131072 /* Never */,
43618
+ "never",
43619
+ /*objectFlags*/
43620
+ void 0,
43621
+ "implicit"
43622
+ );
43623
+ var unreachableNeverType = createIntrinsicType(
43624
+ 131072 /* Never */,
43625
+ "never",
43626
+ /*objectFlags*/
43627
+ void 0,
43628
+ "unreachable"
43629
+ );
43572
43630
  var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object");
43573
43631
  var stringOrNumberType = getUnionType([stringType, numberType]);
43574
43632
  var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]);
@@ -43578,7 +43636,13 @@ function createTypeChecker(host) {
43578
43636
  var numericStringType = getTemplateLiteralType(["", ""], [numberType]);
43579
43637
  var restrictiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t, () => "(restrictive mapper)");
43580
43638
  var permissiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? wildcardType : t, () => "(permissive mapper)");
43581
- var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never");
43639
+ var uniqueLiteralType = createIntrinsicType(
43640
+ 131072 /* Never */,
43641
+ "never",
43642
+ /*objectFlags*/
43643
+ void 0,
43644
+ "unique literal"
43645
+ );
43582
43646
  var uniqueLiteralMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t, () => "(unique literal mapper)");
43583
43647
  var outofbandVarianceMarkerHandler;
43584
43648
  var reportUnreliableMapper = makeFunctionTypeMapper((t) => {
@@ -46822,12 +46886,21 @@ function createTypeChecker(host) {
46822
46886
  function createOriginType(flags) {
46823
46887
  return new Type7(checker, flags);
46824
46888
  }
46825
- function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) {
46889
+ function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) {
46890
+ checkIntrinsicName(intrinsicName, debugIntrinsicName);
46826
46891
  const type = createType(kind);
46827
46892
  type.intrinsicName = intrinsicName;
46893
+ type.debugIntrinsicName = debugIntrinsicName;
46828
46894
  type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */;
46829
46895
  return type;
46830
46896
  }
46897
+ function checkIntrinsicName(name, debug) {
46898
+ const key = `${name},${debug ?? ""}`;
46899
+ if (seenIntrinsicNames.has(key)) {
46900
+ Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : ""}; you may need to pass a name to createIntrinsicType.`);
46901
+ }
46902
+ seenIntrinsicNames.add(key);
46903
+ }
46831
46904
  function createObjectType(objectFlags, symbol) {
46832
46905
  const type = createTypeWithSymbol(524288 /* Object */, symbol);
46833
46906
  type.objectFlags = objectFlags;
@@ -49124,6 +49197,10 @@ function createTypeChecker(host) {
49124
49197
  const type = checkExpression(name.expression);
49125
49198
  return !!(type.flags & 402653316 /* StringLike */);
49126
49199
  }
49200
+ if (isElementAccessExpression(name)) {
49201
+ const type = checkExpression(name.argumentExpression);
49202
+ return !!(type.flags & 402653316 /* StringLike */);
49203
+ }
49127
49204
  return isStringLiteral(name);
49128
49205
  }
49129
49206
  function isSingleQuotedStringNamed(d) {
@@ -50559,6 +50636,7 @@ function createTypeChecker(host) {
50559
50636
  if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) {
50560
50637
  serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 1 /* Export */);
50561
50638
  } else {
50639
+ const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */;
50562
50640
  const statement = factory.createVariableStatement(
50563
50641
  /*modifiers*/
50564
50642
  void 0,
@@ -50569,7 +50647,7 @@ function createTypeChecker(host) {
50569
50647
  void 0,
50570
50648
  serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled)
50571
50649
  )
50572
- ], ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */)
50650
+ ], flags)
50573
50651
  );
50574
50652
  addResult(
50575
50653
  statement,
@@ -53489,13 +53567,14 @@ function createTypeChecker(host) {
53489
53567
  const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
53490
53568
  const paramSymbol = createSymbol(
53491
53569
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
53492
- paramName || `arg${i}`
53570
+ paramName || `arg${i}`,
53571
+ isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
53493
53572
  );
53494
53573
  paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
53495
53574
  params[i] = paramSymbol;
53496
53575
  }
53497
53576
  if (needsExtraRestElement) {
53498
- const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
53577
+ const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
53499
53578
  restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
53500
53579
  if (shorter === right) {
53501
53580
  restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
@@ -53863,7 +53942,9 @@ function createTypeChecker(host) {
53863
53942
  } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) {
53864
53943
  const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType;
53865
53944
  const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType));
53866
- const indexInfo = createIndexInfo(indexKeyType, propType, !!(templateModifiers & 1 /* IncludeReadonly */));
53945
+ const modifiersIndexInfo = getApplicableIndexInfo(modifiersType, propNameType);
53946
+ const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && (modifiersIndexInfo == null ? void 0 : modifiersIndexInfo.isReadonly));
53947
+ const indexInfo = createIndexInfo(indexKeyType, propType, isReadonly);
53867
53948
  indexInfos = appendIndexInfo(
53868
53949
  indexInfos,
53869
53950
  indexInfo,
@@ -55461,7 +55542,13 @@ function createTypeChecker(host) {
55461
55542
  const id = getAliasId(symbol, typeArguments);
55462
55543
  let errorType2 = errorTypes.get(id);
55463
55544
  if (!errorType2) {
55464
- errorType2 = createIntrinsicType(1 /* Any */, "error");
55545
+ errorType2 = createIntrinsicType(
55546
+ 1 /* Any */,
55547
+ "error",
55548
+ /*objectFlags*/
55549
+ void 0,
55550
+ `alias ${id}`
55551
+ );
55465
55552
  errorType2.aliasSymbol = symbol;
55466
55553
  errorType2.aliasTypeArguments = typeArguments;
55467
55554
  errorTypes.set(id, errorType2);
@@ -55634,7 +55721,7 @@ function createTypeChecker(host) {
55634
55721
  if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
55635
55722
  const typeParameter = getHomomorphicTypeVariable(mappedType);
55636
55723
  if (typeParameter) {
55637
- const constraint = getConstraintOfTypeParameter(typeParameter);
55724
+ const constraint = getConstraintOfTypeParameter(getConditionalFlowTypeOfType(typeParameter, parent));
55638
55725
  if (constraint && everyType(constraint, isArrayOrTupleType)) {
55639
55726
  constraints = append(constraints, getUnionType([numberType, numericStringType]));
55640
55727
  }
@@ -64445,7 +64532,7 @@ function createTypeChecker(host) {
64445
64532
  function hasMatchingArgument(expression, reference) {
64446
64533
  if (expression.arguments) {
64447
64534
  for (const argument of expression.arguments) {
64448
- if (isOrContainsMatchingReference(reference, argument)) {
64535
+ if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
64449
64536
  return true;
64450
64537
  }
64451
64538
  }
@@ -66085,7 +66172,7 @@ function createTypeChecker(host) {
66085
66172
  false
66086
66173
  );
66087
66174
  }
66088
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
66175
+ if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
66089
66176
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
66090
66177
  }
66091
66178
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
@@ -81447,7 +81534,7 @@ function createTypeChecker(host) {
81447
81534
  if (!symbol || !(symbol.flags & 16 /* Function */)) {
81448
81535
  return false;
81449
81536
  }
81450
- return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && p.valueDeclaration && isPropertyAccessExpression(p.valueDeclaration));
81537
+ return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && isExpandoPropertyDeclaration(p.valueDeclaration));
81451
81538
  }
81452
81539
  function getPropertiesOfContainerFunction(node) {
81453
81540
  const declaration = getParseTreeNode(node, isFunctionDeclaration);
@@ -81954,11 +82041,11 @@ function createTypeChecker(host) {
81954
82041
  if (fileToDirective.has(file.path))
81955
82042
  return;
81956
82043
  fileToDirective.set(file.path, [key, mode]);
81957
- for (const { fileName } of file.referencedFiles) {
82044
+ for (const { fileName, resolutionMode } of file.referencedFiles) {
81958
82045
  const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
81959
82046
  const referencedFile = host.getSourceFile(resolvedFile);
81960
82047
  if (referencedFile) {
81961
- addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
82048
+ addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat);
81962
82049
  }
81963
82050
  }
81964
82051
  }
@@ -107777,7 +107864,7 @@ function transformDeclarations(context) {
107777
107864
  fakespace.symbol = props[0].parent;
107778
107865
  const exportMappings = [];
107779
107866
  let declarations = mapDefined(props, (p) => {
107780
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
107867
+ if (!isExpandoPropertyDeclaration(p.valueDeclaration)) {
107781
107868
  return void 0;
107782
107869
  }
107783
107870
  const nameStr = unescapeLeadingUnderscores(p.escapedName);
package/lib/tsserver.js CHANGED
@@ -1332,6 +1332,7 @@ __export(server_exports, {
1332
1332
  isExclamationToken: () => isExclamationToken,
1333
1333
  isExcludedFile: () => isExcludedFile,
1334
1334
  isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,
1335
+ isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,
1335
1336
  isExportAssignment: () => isExportAssignment,
1336
1337
  isExportDeclaration: () => isExportDeclaration,
1337
1338
  isExportModifier: () => isExportModifier,
@@ -4468,7 +4469,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
4468
4469
  // for use with vscode-js-debug's new customDescriptionGenerator in launch.json
4469
4470
  __tsDebuggerDisplay: {
4470
4471
  value() {
4471
- const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}` : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
4472
+ const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
4472
4473
  const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
4473
4474
  return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`;
4474
4475
  }
@@ -21634,6 +21635,9 @@ function getPropertyNameFromType(type) {
21634
21635
  }
21635
21636
  return Debug.fail();
21636
21637
  }
21638
+ function isExpandoPropertyDeclaration(declaration) {
21639
+ return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration));
21640
+ }
21637
21641
 
21638
21642
  // src/compiler/factory/baseNodeFactory.ts
21639
21643
  function createBaseNodeFactory() {
@@ -48232,29 +48236,72 @@ function createTypeChecker(host) {
48232
48236
  var resolvingSymbol = createSymbol(0, "__resolving__" /* Resolving */);
48233
48237
  var unresolvedSymbols = /* @__PURE__ */ new Map();
48234
48238
  var errorTypes = /* @__PURE__ */ new Map();
48239
+ var seenIntrinsicNames = /* @__PURE__ */ new Set();
48235
48240
  var anyType = createIntrinsicType(1 /* Any */, "any");
48236
- var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */);
48237
- var wildcardType = createIntrinsicType(1 /* Any */, "any");
48238
- var blockedStringType = createIntrinsicType(1 /* Any */, "any");
48241
+ var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */, "auto");
48242
+ var wildcardType = createIntrinsicType(
48243
+ 1 /* Any */,
48244
+ "any",
48245
+ /*objectFlags*/
48246
+ void 0,
48247
+ "wildcard"
48248
+ );
48249
+ var blockedStringType = createIntrinsicType(
48250
+ 1 /* Any */,
48251
+ "any",
48252
+ /*objectFlags*/
48253
+ void 0,
48254
+ "blocked string"
48255
+ );
48239
48256
  var errorType = createIntrinsicType(1 /* Any */, "error");
48240
48257
  var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
48241
- var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */);
48258
+ var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable");
48242
48259
  var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic");
48243
48260
  var unknownType = createIntrinsicType(2 /* Unknown */, "unknown");
48244
- var nonNullUnknownType = createIntrinsicType(2 /* Unknown */, "unknown");
48261
+ var nonNullUnknownType = createIntrinsicType(
48262
+ 2 /* Unknown */,
48263
+ "unknown",
48264
+ /*objectFlags*/
48265
+ void 0,
48266
+ "non-null"
48267
+ );
48245
48268
  var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined");
48246
- var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */);
48247
- var missingType = createIntrinsicType(32768 /* Undefined */, "undefined");
48269
+ var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening");
48270
+ var missingType = createIntrinsicType(
48271
+ 32768 /* Undefined */,
48272
+ "undefined",
48273
+ /*objectFlags*/
48274
+ void 0,
48275
+ "missing"
48276
+ );
48248
48277
  var undefinedOrMissingType = exactOptionalPropertyTypes ? missingType : undefinedType;
48249
- var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined");
48278
+ var optionalType = createIntrinsicType(
48279
+ 32768 /* Undefined */,
48280
+ "undefined",
48281
+ /*objectFlags*/
48282
+ void 0,
48283
+ "optional"
48284
+ );
48250
48285
  var nullType = createIntrinsicType(65536 /* Null */, "null");
48251
- var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */);
48286
+ var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */, "widening");
48252
48287
  var stringType = createIntrinsicType(4 /* String */, "string");
48253
48288
  var numberType = createIntrinsicType(8 /* Number */, "number");
48254
48289
  var bigintType = createIntrinsicType(64 /* BigInt */, "bigint");
48255
- var falseType = createIntrinsicType(512 /* BooleanLiteral */, "false");
48290
+ var falseType = createIntrinsicType(
48291
+ 512 /* BooleanLiteral */,
48292
+ "false",
48293
+ /*objectFlags*/
48294
+ void 0,
48295
+ "fresh"
48296
+ );
48256
48297
  var regularFalseType = createIntrinsicType(512 /* BooleanLiteral */, "false");
48257
- var trueType = createIntrinsicType(512 /* BooleanLiteral */, "true");
48298
+ var trueType = createIntrinsicType(
48299
+ 512 /* BooleanLiteral */,
48300
+ "true",
48301
+ /*objectFlags*/
48302
+ void 0,
48303
+ "fresh"
48304
+ );
48258
48305
  var regularTrueType = createIntrinsicType(512 /* BooleanLiteral */, "true");
48259
48306
  trueType.regularType = regularTrueType;
48260
48307
  trueType.freshType = trueType;
@@ -48268,9 +48315,21 @@ function createTypeChecker(host) {
48268
48315
  var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, "symbol");
48269
48316
  var voidType = createIntrinsicType(16384 /* Void */, "void");
48270
48317
  var neverType = createIntrinsicType(131072 /* Never */, "never");
48271
- var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */);
48272
- var implicitNeverType = createIntrinsicType(131072 /* Never */, "never");
48273
- var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never");
48318
+ var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */, "silent");
48319
+ var implicitNeverType = createIntrinsicType(
48320
+ 131072 /* Never */,
48321
+ "never",
48322
+ /*objectFlags*/
48323
+ void 0,
48324
+ "implicit"
48325
+ );
48326
+ var unreachableNeverType = createIntrinsicType(
48327
+ 131072 /* Never */,
48328
+ "never",
48329
+ /*objectFlags*/
48330
+ void 0,
48331
+ "unreachable"
48332
+ );
48274
48333
  var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object");
48275
48334
  var stringOrNumberType = getUnionType([stringType, numberType]);
48276
48335
  var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]);
@@ -48280,7 +48339,13 @@ function createTypeChecker(host) {
48280
48339
  var numericStringType = getTemplateLiteralType(["", ""], [numberType]);
48281
48340
  var restrictiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t, () => "(restrictive mapper)");
48282
48341
  var permissiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? wildcardType : t, () => "(permissive mapper)");
48283
- var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never");
48342
+ var uniqueLiteralType = createIntrinsicType(
48343
+ 131072 /* Never */,
48344
+ "never",
48345
+ /*objectFlags*/
48346
+ void 0,
48347
+ "unique literal"
48348
+ );
48284
48349
  var uniqueLiteralMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t, () => "(unique literal mapper)");
48285
48350
  var outofbandVarianceMarkerHandler;
48286
48351
  var reportUnreliableMapper = makeFunctionTypeMapper((t) => {
@@ -51524,12 +51589,21 @@ function createTypeChecker(host) {
51524
51589
  function createOriginType(flags) {
51525
51590
  return new Type27(checker, flags);
51526
51591
  }
51527
- function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) {
51592
+ function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) {
51593
+ checkIntrinsicName(intrinsicName, debugIntrinsicName);
51528
51594
  const type = createType(kind);
51529
51595
  type.intrinsicName = intrinsicName;
51596
+ type.debugIntrinsicName = debugIntrinsicName;
51530
51597
  type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */;
51531
51598
  return type;
51532
51599
  }
51600
+ function checkIntrinsicName(name, debug) {
51601
+ const key = `${name},${debug ?? ""}`;
51602
+ if (seenIntrinsicNames.has(key)) {
51603
+ Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : ""}; you may need to pass a name to createIntrinsicType.`);
51604
+ }
51605
+ seenIntrinsicNames.add(key);
51606
+ }
51533
51607
  function createObjectType(objectFlags, symbol) {
51534
51608
  const type = createTypeWithSymbol(524288 /* Object */, symbol);
51535
51609
  type.objectFlags = objectFlags;
@@ -53826,6 +53900,10 @@ function createTypeChecker(host) {
53826
53900
  const type = checkExpression(name.expression);
53827
53901
  return !!(type.flags & 402653316 /* StringLike */);
53828
53902
  }
53903
+ if (isElementAccessExpression(name)) {
53904
+ const type = checkExpression(name.argumentExpression);
53905
+ return !!(type.flags & 402653316 /* StringLike */);
53906
+ }
53829
53907
  return isStringLiteral(name);
53830
53908
  }
53831
53909
  function isSingleQuotedStringNamed(d) {
@@ -55261,6 +55339,7 @@ function createTypeChecker(host) {
55261
55339
  if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) {
55262
55340
  serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 1 /* Export */);
55263
55341
  } else {
55342
+ const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */;
55264
55343
  const statement = factory.createVariableStatement(
55265
55344
  /*modifiers*/
55266
55345
  void 0,
@@ -55271,7 +55350,7 @@ function createTypeChecker(host) {
55271
55350
  void 0,
55272
55351
  serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled)
55273
55352
  )
55274
- ], ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */)
55353
+ ], flags)
55275
55354
  );
55276
55355
  addResult(
55277
55356
  statement,
@@ -58191,13 +58270,14 @@ function createTypeChecker(host) {
58191
58270
  const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
58192
58271
  const paramSymbol = createSymbol(
58193
58272
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
58194
- paramName || `arg${i}`
58273
+ paramName || `arg${i}`,
58274
+ isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
58195
58275
  );
58196
58276
  paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
58197
58277
  params[i] = paramSymbol;
58198
58278
  }
58199
58279
  if (needsExtraRestElement) {
58200
- const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
58280
+ const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
58201
58281
  restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
58202
58282
  if (shorter === right) {
58203
58283
  restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
@@ -58565,7 +58645,9 @@ function createTypeChecker(host) {
58565
58645
  } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) {
58566
58646
  const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType;
58567
58647
  const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType));
58568
- const indexInfo = createIndexInfo(indexKeyType, propType, !!(templateModifiers & 1 /* IncludeReadonly */));
58648
+ const modifiersIndexInfo = getApplicableIndexInfo(modifiersType, propNameType);
58649
+ const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && (modifiersIndexInfo == null ? void 0 : modifiersIndexInfo.isReadonly));
58650
+ const indexInfo = createIndexInfo(indexKeyType, propType, isReadonly);
58569
58651
  indexInfos = appendIndexInfo(
58570
58652
  indexInfos,
58571
58653
  indexInfo,
@@ -60163,7 +60245,13 @@ function createTypeChecker(host) {
60163
60245
  const id = getAliasId(symbol, typeArguments);
60164
60246
  let errorType2 = errorTypes.get(id);
60165
60247
  if (!errorType2) {
60166
- errorType2 = createIntrinsicType(1 /* Any */, "error");
60248
+ errorType2 = createIntrinsicType(
60249
+ 1 /* Any */,
60250
+ "error",
60251
+ /*objectFlags*/
60252
+ void 0,
60253
+ `alias ${id}`
60254
+ );
60167
60255
  errorType2.aliasSymbol = symbol;
60168
60256
  errorType2.aliasTypeArguments = typeArguments;
60169
60257
  errorTypes.set(id, errorType2);
@@ -60336,7 +60424,7 @@ function createTypeChecker(host) {
60336
60424
  if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
60337
60425
  const typeParameter = getHomomorphicTypeVariable(mappedType);
60338
60426
  if (typeParameter) {
60339
- const constraint = getConstraintOfTypeParameter(typeParameter);
60427
+ const constraint = getConstraintOfTypeParameter(getConditionalFlowTypeOfType(typeParameter, parent2));
60340
60428
  if (constraint && everyType(constraint, isArrayOrTupleType)) {
60341
60429
  constraints = append(constraints, getUnionType([numberType, numericStringType]));
60342
60430
  }
@@ -69147,7 +69235,7 @@ function createTypeChecker(host) {
69147
69235
  function hasMatchingArgument(expression, reference) {
69148
69236
  if (expression.arguments) {
69149
69237
  for (const argument of expression.arguments) {
69150
- if (isOrContainsMatchingReference(reference, argument)) {
69238
+ if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
69151
69239
  return true;
69152
69240
  }
69153
69241
  }
@@ -70787,7 +70875,7 @@ function createTypeChecker(host) {
70787
70875
  false
70788
70876
  );
70789
70877
  }
70790
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
70878
+ if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
70791
70879
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
70792
70880
  }
70793
70881
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
@@ -86149,7 +86237,7 @@ function createTypeChecker(host) {
86149
86237
  if (!symbol || !(symbol.flags & 16 /* Function */)) {
86150
86238
  return false;
86151
86239
  }
86152
- return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && p.valueDeclaration && isPropertyAccessExpression(p.valueDeclaration));
86240
+ return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && isExpandoPropertyDeclaration(p.valueDeclaration));
86153
86241
  }
86154
86242
  function getPropertiesOfContainerFunction(node) {
86155
86243
  const declaration = getParseTreeNode(node, isFunctionDeclaration);
@@ -86656,11 +86744,11 @@ function createTypeChecker(host) {
86656
86744
  if (fileToDirective.has(file.path))
86657
86745
  return;
86658
86746
  fileToDirective.set(file.path, [key, mode]);
86659
- for (const { fileName } of file.referencedFiles) {
86747
+ for (const { fileName, resolutionMode } of file.referencedFiles) {
86660
86748
  const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
86661
86749
  const referencedFile = host.getSourceFile(resolvedFile);
86662
86750
  if (referencedFile) {
86663
- addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
86751
+ addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat);
86664
86752
  }
86665
86753
  }
86666
86754
  }
@@ -112650,7 +112738,7 @@ function transformDeclarations(context) {
112650
112738
  fakespace.symbol = props[0].parent;
112651
112739
  const exportMappings = [];
112652
112740
  let declarations = mapDefined(props, (p) => {
112653
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
112741
+ if (!isExpandoPropertyDeclaration(p.valueDeclaration)) {
112654
112742
  return void 0;
112655
112743
  }
112656
112744
  const nameStr = unescapeLeadingUnderscores(p.escapedName);
@@ -133323,7 +133411,7 @@ function createCacheableExportInfoMap(host) {
133323
133411
  }
133324
133412
  };
133325
133413
  if (Debug.isDebugging) {
133326
- Object.defineProperty(cache, "__cache", { get: () => exportInfo });
133414
+ Object.defineProperty(cache, "__cache", { value: exportInfo });
133327
133415
  }
133328
133416
  return cache;
133329
133417
  function rehydrateCachedInfo(info) {
@@ -133361,11 +133449,15 @@ function createCacheableExportInfoMap(host) {
133361
133449
  }
133362
133450
  function key(importedName, symbol, ambientModuleName, checker) {
133363
133451
  const moduleKey = ambientModuleName || "";
133364
- return `${importedName}|${getSymbolId(skipAlias(symbol, checker))}|${moduleKey}`;
133452
+ return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`;
133365
133453
  }
133366
133454
  function parseKey(key2) {
133367
- const symbolName2 = key2.substring(0, key2.indexOf("|"));
133368
- const moduleKey = key2.substring(key2.lastIndexOf("|") + 1);
133455
+ const firstSpace = key2.indexOf(" ");
133456
+ const secondSpace = key2.indexOf(" ", firstSpace + 1);
133457
+ const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10);
133458
+ const data = key2.substring(secondSpace + 1);
133459
+ const symbolName2 = data.substring(0, symbolNameLength);
133460
+ const moduleKey = data.substring(symbolNameLength + 1);
133369
133461
  const ambientModuleName = moduleKey === "" ? void 0 : moduleKey;
133370
133462
  return { symbolName: symbolName2, ambientModuleName };
133371
133463
  }
@@ -173302,6 +173394,7 @@ __export(ts_exports2, {
173302
173394
  isExclamationToken: () => isExclamationToken,
173303
173395
  isExcludedFile: () => isExcludedFile,
173304
173396
  isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,
173397
+ isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,
173305
173398
  isExportAssignment: () => isExportAssignment,
173306
173399
  isExportDeclaration: () => isExportDeclaration,
173307
173400
  isExportModifier: () => isExportModifier,
@@ -187863,6 +187956,7 @@ start(initializeNodeSystem(), require("os").platform());
187863
187956
  isExclamationToken,
187864
187957
  isExcludedFile,
187865
187958
  isExclusivelyTypeOnlyImportOrExport,
187959
+ isExpandoPropertyDeclaration,
187866
187960
  isExportAssignment,
187867
187961
  isExportDeclaration,
187868
187962
  isExportModifier,
@@ -11040,7 +11040,7 @@ declare namespace ts {
11040
11040
  * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default.
11041
11041
  */
11042
11042
  exportName: string;
11043
- exportMapKey?: string;
11043
+ exportMapKey?: ExportMapInfoKey;
11044
11044
  moduleSpecifier?: string;
11045
11045
  /** The file name declaring the export's module symbol, if it was an external module */
11046
11046
  fileName?: string;
@@ -11050,7 +11050,7 @@ declare namespace ts {
11050
11050
  isPackageJsonImport?: true;
11051
11051
  }
11052
11052
  interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport {
11053
- exportMapKey: string;
11053
+ exportMapKey: ExportMapInfoKey;
11054
11054
  }
11055
11055
  interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport {
11056
11056
  moduleSpecifier: string;
@@ -11365,6 +11365,9 @@ declare namespace ts {
11365
11365
  span: TextSpan;
11366
11366
  preferences: UserPreferences;
11367
11367
  }
11368
+ type ExportMapInfoKey = string & {
11369
+ __exportInfoKey: void;
11370
+ };
11368
11371
  /** The classifier is used for syntactic highlighting in editors via the TSServer */
11369
11372
  function createClassifier(): Classifier;
11370
11373
  interface DocumentHighlights {
package/lib/typescript.js CHANGED
@@ -2188,7 +2188,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
2188
2188
  // for use with vscode-js-debug's new customDescriptionGenerator in launch.json
2189
2189
  __tsDebuggerDisplay: {
2190
2190
  value() {
2191
- const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}` : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
2191
+ const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
2192
2192
  const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
2193
2193
  return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`;
2194
2194
  }
@@ -18862,6 +18862,9 @@ ${lanes.join("\n")}
18862
18862
  }
18863
18863
  return Debug.fail();
18864
18864
  }
18865
+ function isExpandoPropertyDeclaration(declaration) {
18866
+ return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration));
18867
+ }
18865
18868
  var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, getScriptTargetFeatures, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
18866
18869
  var init_utilities = __esm({
18867
18870
  "src/compiler/utilities.ts"() {
@@ -45999,29 +46002,72 @@ ${lanes.join("\n")}
45999
46002
  var resolvingSymbol = createSymbol(0, "__resolving__" /* Resolving */);
46000
46003
  var unresolvedSymbols = /* @__PURE__ */ new Map();
46001
46004
  var errorTypes = /* @__PURE__ */ new Map();
46005
+ var seenIntrinsicNames = /* @__PURE__ */ new Set();
46002
46006
  var anyType = createIntrinsicType(1 /* Any */, "any");
46003
- var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */);
46004
- var wildcardType = createIntrinsicType(1 /* Any */, "any");
46005
- var blockedStringType = createIntrinsicType(1 /* Any */, "any");
46007
+ var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */, "auto");
46008
+ var wildcardType = createIntrinsicType(
46009
+ 1 /* Any */,
46010
+ "any",
46011
+ /*objectFlags*/
46012
+ void 0,
46013
+ "wildcard"
46014
+ );
46015
+ var blockedStringType = createIntrinsicType(
46016
+ 1 /* Any */,
46017
+ "any",
46018
+ /*objectFlags*/
46019
+ void 0,
46020
+ "blocked string"
46021
+ );
46006
46022
  var errorType = createIntrinsicType(1 /* Any */, "error");
46007
46023
  var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
46008
- var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */);
46024
+ var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable");
46009
46025
  var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic");
46010
46026
  var unknownType = createIntrinsicType(2 /* Unknown */, "unknown");
46011
- var nonNullUnknownType = createIntrinsicType(2 /* Unknown */, "unknown");
46027
+ var nonNullUnknownType = createIntrinsicType(
46028
+ 2 /* Unknown */,
46029
+ "unknown",
46030
+ /*objectFlags*/
46031
+ void 0,
46032
+ "non-null"
46033
+ );
46012
46034
  var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined");
46013
- var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */);
46014
- var missingType = createIntrinsicType(32768 /* Undefined */, "undefined");
46035
+ var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening");
46036
+ var missingType = createIntrinsicType(
46037
+ 32768 /* Undefined */,
46038
+ "undefined",
46039
+ /*objectFlags*/
46040
+ void 0,
46041
+ "missing"
46042
+ );
46015
46043
  var undefinedOrMissingType = exactOptionalPropertyTypes ? missingType : undefinedType;
46016
- var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined");
46044
+ var optionalType = createIntrinsicType(
46045
+ 32768 /* Undefined */,
46046
+ "undefined",
46047
+ /*objectFlags*/
46048
+ void 0,
46049
+ "optional"
46050
+ );
46017
46051
  var nullType = createIntrinsicType(65536 /* Null */, "null");
46018
- var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */);
46052
+ var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */, "widening");
46019
46053
  var stringType = createIntrinsicType(4 /* String */, "string");
46020
46054
  var numberType = createIntrinsicType(8 /* Number */, "number");
46021
46055
  var bigintType = createIntrinsicType(64 /* BigInt */, "bigint");
46022
- var falseType = createIntrinsicType(512 /* BooleanLiteral */, "false");
46056
+ var falseType = createIntrinsicType(
46057
+ 512 /* BooleanLiteral */,
46058
+ "false",
46059
+ /*objectFlags*/
46060
+ void 0,
46061
+ "fresh"
46062
+ );
46023
46063
  var regularFalseType = createIntrinsicType(512 /* BooleanLiteral */, "false");
46024
- var trueType = createIntrinsicType(512 /* BooleanLiteral */, "true");
46064
+ var trueType = createIntrinsicType(
46065
+ 512 /* BooleanLiteral */,
46066
+ "true",
46067
+ /*objectFlags*/
46068
+ void 0,
46069
+ "fresh"
46070
+ );
46025
46071
  var regularTrueType = createIntrinsicType(512 /* BooleanLiteral */, "true");
46026
46072
  trueType.regularType = regularTrueType;
46027
46073
  trueType.freshType = trueType;
@@ -46035,9 +46081,21 @@ ${lanes.join("\n")}
46035
46081
  var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, "symbol");
46036
46082
  var voidType = createIntrinsicType(16384 /* Void */, "void");
46037
46083
  var neverType = createIntrinsicType(131072 /* Never */, "never");
46038
- var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */);
46039
- var implicitNeverType = createIntrinsicType(131072 /* Never */, "never");
46040
- var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never");
46084
+ var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */, "silent");
46085
+ var implicitNeverType = createIntrinsicType(
46086
+ 131072 /* Never */,
46087
+ "never",
46088
+ /*objectFlags*/
46089
+ void 0,
46090
+ "implicit"
46091
+ );
46092
+ var unreachableNeverType = createIntrinsicType(
46093
+ 131072 /* Never */,
46094
+ "never",
46095
+ /*objectFlags*/
46096
+ void 0,
46097
+ "unreachable"
46098
+ );
46041
46099
  var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object");
46042
46100
  var stringOrNumberType = getUnionType([stringType, numberType]);
46043
46101
  var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]);
@@ -46047,7 +46105,13 @@ ${lanes.join("\n")}
46047
46105
  var numericStringType = getTemplateLiteralType(["", ""], [numberType]);
46048
46106
  var restrictiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t, () => "(restrictive mapper)");
46049
46107
  var permissiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? wildcardType : t, () => "(permissive mapper)");
46050
- var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never");
46108
+ var uniqueLiteralType = createIntrinsicType(
46109
+ 131072 /* Never */,
46110
+ "never",
46111
+ /*objectFlags*/
46112
+ void 0,
46113
+ "unique literal"
46114
+ );
46051
46115
  var uniqueLiteralMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t, () => "(unique literal mapper)");
46052
46116
  var outofbandVarianceMarkerHandler;
46053
46117
  var reportUnreliableMapper = makeFunctionTypeMapper((t) => {
@@ -49291,12 +49355,21 @@ ${lanes.join("\n")}
49291
49355
  function createOriginType(flags) {
49292
49356
  return new Type27(checker, flags);
49293
49357
  }
49294
- function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) {
49358
+ function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) {
49359
+ checkIntrinsicName(intrinsicName, debugIntrinsicName);
49295
49360
  const type = createType(kind);
49296
49361
  type.intrinsicName = intrinsicName;
49362
+ type.debugIntrinsicName = debugIntrinsicName;
49297
49363
  type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */;
49298
49364
  return type;
49299
49365
  }
49366
+ function checkIntrinsicName(name, debug) {
49367
+ const key = `${name},${debug ?? ""}`;
49368
+ if (seenIntrinsicNames.has(key)) {
49369
+ Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : ""}; you may need to pass a name to createIntrinsicType.`);
49370
+ }
49371
+ seenIntrinsicNames.add(key);
49372
+ }
49300
49373
  function createObjectType(objectFlags, symbol) {
49301
49374
  const type = createTypeWithSymbol(524288 /* Object */, symbol);
49302
49375
  type.objectFlags = objectFlags;
@@ -51593,6 +51666,10 @@ ${lanes.join("\n")}
51593
51666
  const type = checkExpression(name.expression);
51594
51667
  return !!(type.flags & 402653316 /* StringLike */);
51595
51668
  }
51669
+ if (isElementAccessExpression(name)) {
51670
+ const type = checkExpression(name.argumentExpression);
51671
+ return !!(type.flags & 402653316 /* StringLike */);
51672
+ }
51596
51673
  return isStringLiteral(name);
51597
51674
  }
51598
51675
  function isSingleQuotedStringNamed(d) {
@@ -53028,6 +53105,7 @@ ${lanes.join("\n")}
53028
53105
  if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) {
53029
53106
  serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 1 /* Export */);
53030
53107
  } else {
53108
+ const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */;
53031
53109
  const statement = factory.createVariableStatement(
53032
53110
  /*modifiers*/
53033
53111
  void 0,
@@ -53038,7 +53116,7 @@ ${lanes.join("\n")}
53038
53116
  void 0,
53039
53117
  serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled)
53040
53118
  )
53041
- ], ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */)
53119
+ ], flags)
53042
53120
  );
53043
53121
  addResult(
53044
53122
  statement,
@@ -55958,13 +56036,14 @@ ${lanes.join("\n")}
55958
56036
  const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0;
55959
56037
  const paramSymbol = createSymbol(
55960
56038
  1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0),
55961
- paramName || `arg${i}`
56039
+ paramName || `arg${i}`,
56040
+ isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0
55962
56041
  );
55963
56042
  paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
55964
56043
  params[i] = paramSymbol;
55965
56044
  }
55966
56045
  if (needsExtraRestElement) {
55967
- const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args");
56046
+ const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */);
55968
56047
  restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount));
55969
56048
  if (shorter === right) {
55970
56049
  restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper);
@@ -56332,7 +56411,9 @@ ${lanes.join("\n")}
56332
56411
  } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) {
56333
56412
  const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType;
56334
56413
  const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType));
56335
- const indexInfo = createIndexInfo(indexKeyType, propType, !!(templateModifiers & 1 /* IncludeReadonly */));
56414
+ const modifiersIndexInfo = getApplicableIndexInfo(modifiersType, propNameType);
56415
+ const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && (modifiersIndexInfo == null ? void 0 : modifiersIndexInfo.isReadonly));
56416
+ const indexInfo = createIndexInfo(indexKeyType, propType, isReadonly);
56336
56417
  indexInfos = appendIndexInfo(
56337
56418
  indexInfos,
56338
56419
  indexInfo,
@@ -57930,7 +58011,13 @@ ${lanes.join("\n")}
57930
58011
  const id = getAliasId(symbol, typeArguments);
57931
58012
  let errorType2 = errorTypes.get(id);
57932
58013
  if (!errorType2) {
57933
- errorType2 = createIntrinsicType(1 /* Any */, "error");
58014
+ errorType2 = createIntrinsicType(
58015
+ 1 /* Any */,
58016
+ "error",
58017
+ /*objectFlags*/
58018
+ void 0,
58019
+ `alias ${id}`
58020
+ );
57934
58021
  errorType2.aliasSymbol = symbol;
57935
58022
  errorType2.aliasTypeArguments = typeArguments;
57936
58023
  errorTypes.set(id, errorType2);
@@ -58103,7 +58190,7 @@ ${lanes.join("\n")}
58103
58190
  if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
58104
58191
  const typeParameter = getHomomorphicTypeVariable(mappedType);
58105
58192
  if (typeParameter) {
58106
- const constraint = getConstraintOfTypeParameter(typeParameter);
58193
+ const constraint = getConstraintOfTypeParameter(getConditionalFlowTypeOfType(typeParameter, parent2));
58107
58194
  if (constraint && everyType(constraint, isArrayOrTupleType)) {
58108
58195
  constraints = append(constraints, getUnionType([numberType, numericStringType]));
58109
58196
  }
@@ -66914,7 +67001,7 @@ ${lanes.join("\n")}
66914
67001
  function hasMatchingArgument(expression, reference) {
66915
67002
  if (expression.arguments) {
66916
67003
  for (const argument of expression.arguments) {
66917
- if (isOrContainsMatchingReference(reference, argument)) {
67004
+ if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) {
66918
67005
  return true;
66919
67006
  }
66920
67007
  }
@@ -68554,7 +68641,7 @@ ${lanes.join("\n")}
68554
68641
  false
68555
68642
  );
68556
68643
  }
68557
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
68644
+ if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) {
68558
68645
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
68559
68646
  }
68560
68647
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
@@ -83916,7 +84003,7 @@ ${lanes.join("\n")}
83916
84003
  if (!symbol || !(symbol.flags & 16 /* Function */)) {
83917
84004
  return false;
83918
84005
  }
83919
- return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && p.valueDeclaration && isPropertyAccessExpression(p.valueDeclaration));
84006
+ return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && isExpandoPropertyDeclaration(p.valueDeclaration));
83920
84007
  }
83921
84008
  function getPropertiesOfContainerFunction(node) {
83922
84009
  const declaration = getParseTreeNode(node, isFunctionDeclaration);
@@ -84423,11 +84510,11 @@ ${lanes.join("\n")}
84423
84510
  if (fileToDirective.has(file.path))
84424
84511
  return;
84425
84512
  fileToDirective.set(file.path, [key, mode]);
84426
- for (const { fileName } of file.referencedFiles) {
84513
+ for (const { fileName, resolutionMode } of file.referencedFiles) {
84427
84514
  const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
84428
84515
  const referencedFile = host.getSourceFile(resolvedFile);
84429
84516
  if (referencedFile) {
84430
- addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
84517
+ addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat);
84431
84518
  }
84432
84519
  }
84433
84520
  }
@@ -110727,7 +110814,7 @@ ${lanes.join("\n")}
110727
110814
  fakespace.symbol = props[0].parent;
110728
110815
  const exportMappings = [];
110729
110816
  let declarations = mapDefined(props, (p) => {
110730
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
110817
+ if (!isExpandoPropertyDeclaration(p.valueDeclaration)) {
110731
110818
  return void 0;
110732
110819
  }
110733
110820
  const nameStr = unescapeLeadingUnderscores(p.escapedName);
@@ -131624,7 +131711,7 @@ ${lanes.join("\n")}
131624
131711
  }
131625
131712
  };
131626
131713
  if (Debug.isDebugging) {
131627
- Object.defineProperty(cache, "__cache", { get: () => exportInfo });
131714
+ Object.defineProperty(cache, "__cache", { value: exportInfo });
131628
131715
  }
131629
131716
  return cache;
131630
131717
  function rehydrateCachedInfo(info) {
@@ -131662,11 +131749,15 @@ ${lanes.join("\n")}
131662
131749
  }
131663
131750
  function key(importedName, symbol, ambientModuleName, checker) {
131664
131751
  const moduleKey = ambientModuleName || "";
131665
- return `${importedName}|${getSymbolId(skipAlias(symbol, checker))}|${moduleKey}`;
131752
+ return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`;
131666
131753
  }
131667
131754
  function parseKey(key2) {
131668
- const symbolName2 = key2.substring(0, key2.indexOf("|"));
131669
- const moduleKey = key2.substring(key2.lastIndexOf("|") + 1);
131755
+ const firstSpace = key2.indexOf(" ");
131756
+ const secondSpace = key2.indexOf(" ", firstSpace + 1);
131757
+ const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10);
131758
+ const data = key2.substring(secondSpace + 1);
131759
+ const symbolName2 = data.substring(0, symbolNameLength);
131760
+ const moduleKey = data.substring(symbolNameLength + 1);
131670
131761
  const ambientModuleName = moduleKey === "" ? void 0 : moduleKey;
131671
131762
  return { symbolName: symbolName2, ambientModuleName };
131672
131763
  }
@@ -184490,6 +184581,7 @@ ${e.message}`;
184490
184581
  isExclamationToken: () => isExclamationToken,
184491
184582
  isExcludedFile: () => isExcludedFile,
184492
184583
  isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,
184584
+ isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,
184493
184585
  isExportAssignment: () => isExportAssignment,
184494
184586
  isExportDeclaration: () => isExportDeclaration,
184495
184587
  isExportModifier: () => isExportModifier,
@@ -186893,6 +186985,7 @@ ${e.message}`;
186893
186985
  isExclamationToken: () => isExclamationToken,
186894
186986
  isExcludedFile: () => isExcludedFile,
186895
186987
  isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,
186988
+ isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,
186896
186989
  isExportAssignment: () => isExportAssignment,
186897
186990
  isExportDeclaration: () => isExportDeclaration,
186898
186991
  isExportModifier: () => isExportModifier,
@@ -1307,7 +1307,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1307
1307
  // for use with vscode-js-debug's new customDescriptionGenerator in launch.json
1308
1308
  __tsDebuggerDisplay: {
1309
1309
  value() {
1310
- const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}` : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
1310
+ const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
1311
1311
  const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
1312
1312
  return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`;
1313
1313
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.3.0-pr-55727-2",
5
+ "version": "5.3.0-pr-55386-10",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -113,5 +113,5 @@
113
113
  "node": "20.1.0",
114
114
  "npm": "8.19.4"
115
115
  },
116
- "gitHead": "93ec2799df89a9621eb6cc3c4bf2367d6b6c0436"
116
+ "gitHead": "e8f04da6973728f1428d3248f32b587ec43ffa2f"
117
117
  }