@typescript-deploys/pr-build 5.3.0-pr-55727-5 → 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,
@@ -53864,7 +53942,9 @@ function createTypeChecker(host) {
53864
53942
  } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) {
53865
53943
  const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType;
53866
53944
  const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType));
53867
- 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);
53868
53948
  indexInfos = appendIndexInfo(
53869
53949
  indexInfos,
53870
53950
  indexInfo,
@@ -55462,7 +55542,13 @@ function createTypeChecker(host) {
55462
55542
  const id = getAliasId(symbol, typeArguments);
55463
55543
  let errorType2 = errorTypes.get(id);
55464
55544
  if (!errorType2) {
55465
- errorType2 = createIntrinsicType(1 /* Any */, "error");
55545
+ errorType2 = createIntrinsicType(
55546
+ 1 /* Any */,
55547
+ "error",
55548
+ /*objectFlags*/
55549
+ void 0,
55550
+ `alias ${id}`
55551
+ );
55466
55552
  errorType2.aliasSymbol = symbol;
55467
55553
  errorType2.aliasTypeArguments = typeArguments;
55468
55554
  errorTypes.set(id, errorType2);
@@ -55635,7 +55721,7 @@ function createTypeChecker(host) {
55635
55721
  if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
55636
55722
  const typeParameter = getHomomorphicTypeVariable(mappedType);
55637
55723
  if (typeParameter) {
55638
- const constraint = getConstraintOfTypeParameter(typeParameter);
55724
+ const constraint = getConstraintOfTypeParameter(getConditionalFlowTypeOfType(typeParameter, parent));
55639
55725
  if (constraint && everyType(constraint, isArrayOrTupleType)) {
55640
55726
  constraints = append(constraints, getUnionType([numberType, numericStringType]));
55641
55727
  }
@@ -81448,7 +81534,7 @@ function createTypeChecker(host) {
81448
81534
  if (!symbol || !(symbol.flags & 16 /* Function */)) {
81449
81535
  return false;
81450
81536
  }
81451
- 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));
81452
81538
  }
81453
81539
  function getPropertiesOfContainerFunction(node) {
81454
81540
  const declaration = getParseTreeNode(node, isFunctionDeclaration);
@@ -81955,11 +82041,11 @@ function createTypeChecker(host) {
81955
82041
  if (fileToDirective.has(file.path))
81956
82042
  return;
81957
82043
  fileToDirective.set(file.path, [key, mode]);
81958
- for (const { fileName } of file.referencedFiles) {
82044
+ for (const { fileName, resolutionMode } of file.referencedFiles) {
81959
82045
  const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
81960
82046
  const referencedFile = host.getSourceFile(resolvedFile);
81961
82047
  if (referencedFile) {
81962
- addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
82048
+ addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat);
81963
82049
  }
81964
82050
  }
81965
82051
  }
@@ -107778,7 +107864,7 @@ function transformDeclarations(context) {
107778
107864
  fakespace.symbol = props[0].parent;
107779
107865
  const exportMappings = [];
107780
107866
  let declarations = mapDefined(props, (p) => {
107781
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
107867
+ if (!isExpandoPropertyDeclaration(p.valueDeclaration)) {
107782
107868
  return void 0;
107783
107869
  }
107784
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,
@@ -58566,7 +58645,9 @@ function createTypeChecker(host) {
58566
58645
  } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) {
58567
58646
  const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType;
58568
58647
  const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType));
58569
- 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);
58570
58651
  indexInfos = appendIndexInfo(
58571
58652
  indexInfos,
58572
58653
  indexInfo,
@@ -60164,7 +60245,13 @@ function createTypeChecker(host) {
60164
60245
  const id = getAliasId(symbol, typeArguments);
60165
60246
  let errorType2 = errorTypes.get(id);
60166
60247
  if (!errorType2) {
60167
- errorType2 = createIntrinsicType(1 /* Any */, "error");
60248
+ errorType2 = createIntrinsicType(
60249
+ 1 /* Any */,
60250
+ "error",
60251
+ /*objectFlags*/
60252
+ void 0,
60253
+ `alias ${id}`
60254
+ );
60168
60255
  errorType2.aliasSymbol = symbol;
60169
60256
  errorType2.aliasTypeArguments = typeArguments;
60170
60257
  errorTypes.set(id, errorType2);
@@ -60337,7 +60424,7 @@ function createTypeChecker(host) {
60337
60424
  if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
60338
60425
  const typeParameter = getHomomorphicTypeVariable(mappedType);
60339
60426
  if (typeParameter) {
60340
- const constraint = getConstraintOfTypeParameter(typeParameter);
60427
+ const constraint = getConstraintOfTypeParameter(getConditionalFlowTypeOfType(typeParameter, parent2));
60341
60428
  if (constraint && everyType(constraint, isArrayOrTupleType)) {
60342
60429
  constraints = append(constraints, getUnionType([numberType, numericStringType]));
60343
60430
  }
@@ -86150,7 +86237,7 @@ function createTypeChecker(host) {
86150
86237
  if (!symbol || !(symbol.flags & 16 /* Function */)) {
86151
86238
  return false;
86152
86239
  }
86153
- 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));
86154
86241
  }
86155
86242
  function getPropertiesOfContainerFunction(node) {
86156
86243
  const declaration = getParseTreeNode(node, isFunctionDeclaration);
@@ -86657,11 +86744,11 @@ function createTypeChecker(host) {
86657
86744
  if (fileToDirective.has(file.path))
86658
86745
  return;
86659
86746
  fileToDirective.set(file.path, [key, mode]);
86660
- for (const { fileName } of file.referencedFiles) {
86747
+ for (const { fileName, resolutionMode } of file.referencedFiles) {
86661
86748
  const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
86662
86749
  const referencedFile = host.getSourceFile(resolvedFile);
86663
86750
  if (referencedFile) {
86664
- addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
86751
+ addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat);
86665
86752
  }
86666
86753
  }
86667
86754
  }
@@ -112651,7 +112738,7 @@ function transformDeclarations(context) {
112651
112738
  fakespace.symbol = props[0].parent;
112652
112739
  const exportMappings = [];
112653
112740
  let declarations = mapDefined(props, (p) => {
112654
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
112741
+ if (!isExpandoPropertyDeclaration(p.valueDeclaration)) {
112655
112742
  return void 0;
112656
112743
  }
112657
112744
  const nameStr = unescapeLeadingUnderscores(p.escapedName);
@@ -173307,6 +173394,7 @@ __export(ts_exports2, {
173307
173394
  isExclamationToken: () => isExclamationToken,
173308
173395
  isExcludedFile: () => isExcludedFile,
173309
173396
  isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,
173397
+ isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,
173310
173398
  isExportAssignment: () => isExportAssignment,
173311
173399
  isExportDeclaration: () => isExportDeclaration,
173312
173400
  isExportModifier: () => isExportModifier,
@@ -187868,6 +187956,7 @@ start(initializeNodeSystem(), require("os").platform());
187868
187956
  isExclamationToken,
187869
187957
  isExcludedFile,
187870
187958
  isExclusivelyTypeOnlyImportOrExport,
187959
+ isExpandoPropertyDeclaration,
187871
187960
  isExportAssignment,
187872
187961
  isExportDeclaration,
187873
187962
  isExportModifier,
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,
@@ -56333,7 +56411,9 @@ ${lanes.join("\n")}
56333
56411
  } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) {
56334
56412
  const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType;
56335
56413
  const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType));
56336
- 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);
56337
56417
  indexInfos = appendIndexInfo(
56338
56418
  indexInfos,
56339
56419
  indexInfo,
@@ -57931,7 +58011,13 @@ ${lanes.join("\n")}
57931
58011
  const id = getAliasId(symbol, typeArguments);
57932
58012
  let errorType2 = errorTypes.get(id);
57933
58013
  if (!errorType2) {
57934
- errorType2 = createIntrinsicType(1 /* Any */, "error");
58014
+ errorType2 = createIntrinsicType(
58015
+ 1 /* Any */,
58016
+ "error",
58017
+ /*objectFlags*/
58018
+ void 0,
58019
+ `alias ${id}`
58020
+ );
57935
58021
  errorType2.aliasSymbol = symbol;
57936
58022
  errorType2.aliasTypeArguments = typeArguments;
57937
58023
  errorTypes.set(id, errorType2);
@@ -58104,7 +58190,7 @@ ${lanes.join("\n")}
58104
58190
  if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) {
58105
58191
  const typeParameter = getHomomorphicTypeVariable(mappedType);
58106
58192
  if (typeParameter) {
58107
- const constraint = getConstraintOfTypeParameter(typeParameter);
58193
+ const constraint = getConstraintOfTypeParameter(getConditionalFlowTypeOfType(typeParameter, parent2));
58108
58194
  if (constraint && everyType(constraint, isArrayOrTupleType)) {
58109
58195
  constraints = append(constraints, getUnionType([numberType, numericStringType]));
58110
58196
  }
@@ -83917,7 +84003,7 @@ ${lanes.join("\n")}
83917
84003
  if (!symbol || !(symbol.flags & 16 /* Function */)) {
83918
84004
  return false;
83919
84005
  }
83920
- 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));
83921
84007
  }
83922
84008
  function getPropertiesOfContainerFunction(node) {
83923
84009
  const declaration = getParseTreeNode(node, isFunctionDeclaration);
@@ -84424,11 +84510,11 @@ ${lanes.join("\n")}
84424
84510
  if (fileToDirective.has(file.path))
84425
84511
  return;
84426
84512
  fileToDirective.set(file.path, [key, mode]);
84427
- for (const { fileName } of file.referencedFiles) {
84513
+ for (const { fileName, resolutionMode } of file.referencedFiles) {
84428
84514
  const resolvedFile = resolveTripleslashReference(fileName, file.fileName);
84429
84515
  const referencedFile = host.getSourceFile(resolvedFile);
84430
84516
  if (referencedFile) {
84431
- addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat);
84517
+ addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat);
84432
84518
  }
84433
84519
  }
84434
84520
  }
@@ -110728,7 +110814,7 @@ ${lanes.join("\n")}
110728
110814
  fakespace.symbol = props[0].parent;
110729
110815
  const exportMappings = [];
110730
110816
  let declarations = mapDefined(props, (p) => {
110731
- if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) {
110817
+ if (!isExpandoPropertyDeclaration(p.valueDeclaration)) {
110732
110818
  return void 0;
110733
110819
  }
110734
110820
  const nameStr = unescapeLeadingUnderscores(p.escapedName);
@@ -184495,6 +184581,7 @@ ${e.message}`;
184495
184581
  isExclamationToken: () => isExclamationToken,
184496
184582
  isExcludedFile: () => isExcludedFile,
184497
184583
  isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,
184584
+ isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,
184498
184585
  isExportAssignment: () => isExportAssignment,
184499
184586
  isExportDeclaration: () => isExportDeclaration,
184500
184587
  isExportModifier: () => isExportModifier,
@@ -186898,6 +186985,7 @@ ${e.message}`;
186898
186985
  isExclamationToken: () => isExclamationToken,
186899
186986
  isExcludedFile: () => isExcludedFile,
186900
186987
  isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport,
186988
+ isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration,
186901
186989
  isExportAssignment: () => isExportAssignment,
186902
186990
  isExportDeclaration: () => isExportDeclaration,
186903
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-5",
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": "0166f0aec71c4c4395daae79d37217259c5952fd"
116
+ "gitHead": "e8f04da6973728f1428d3248f32b587ec43ffa2f"
117
117
  }