@typescript-deploys/pr-build 5.4.0-pr-57293-15 → 5.4.0-pr-57341-6

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
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.4";
21
- var version = `${versionMajorMinor}.0-insiders.20240205`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240208`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -1746,8 +1746,8 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1746
1746
  // for use with vscode-js-debug's new customDescriptionGenerator in launch.json
1747
1747
  __tsDebuggerDisplay: {
1748
1748
  value() {
1749
- 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 & 2048 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 512 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type";
1750
- const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~2623 /* ObjectTypeKindMask */ : 0;
1749
+ 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";
1750
+ const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0;
1751
1751
  return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`;
1752
1752
  }
1753
1753
  },
@@ -2926,7 +2926,7 @@ var tracingEnabled;
2926
2926
  };
2927
2927
  }
2928
2928
  let reverseMappedProperties = {};
2929
- if (objectFlags & 2048 /* ReverseMapped */) {
2929
+ if (objectFlags & 1024 /* ReverseMapped */) {
2930
2930
  const reverseMappedType = type;
2931
2931
  reverseMappedProperties = {
2932
2932
  reverseMappedSourceType: (_l = reverseMappedType.source) == null ? void 0 : _l.id,
@@ -2935,7 +2935,7 @@ var tracingEnabled;
2935
2935
  };
2936
2936
  }
2937
2937
  let evolvingArrayProperties = {};
2938
- if (objectFlags & 512 /* EvolvingArray */) {
2938
+ if (objectFlags & 256 /* EvolvingArray */) {
2939
2939
  const evolvingArrayType = type;
2940
2940
  evolvingArrayProperties = {
2941
2941
  evolvingArrayElementType: evolvingArrayType.elementType.id,
@@ -3685,43 +3685,42 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
3685
3685
  ObjectFlags3[ObjectFlags3["Tuple"] = 8] = "Tuple";
3686
3686
  ObjectFlags3[ObjectFlags3["Anonymous"] = 16] = "Anonymous";
3687
3687
  ObjectFlags3[ObjectFlags3["Mapped"] = 32] = "Mapped";
3688
- ObjectFlags3[ObjectFlags3["TypeAliasInstantiation"] = 64] = "TypeAliasInstantiation";
3689
- ObjectFlags3[ObjectFlags3["Instantiated"] = 128] = "Instantiated";
3690
- ObjectFlags3[ObjectFlags3["ObjectLiteral"] = 256] = "ObjectLiteral";
3691
- ObjectFlags3[ObjectFlags3["EvolvingArray"] = 512] = "EvolvingArray";
3692
- ObjectFlags3[ObjectFlags3["ObjectLiteralPatternWithComputedProperties"] = 1024] = "ObjectLiteralPatternWithComputedProperties";
3693
- ObjectFlags3[ObjectFlags3["ReverseMapped"] = 2048] = "ReverseMapped";
3694
- ObjectFlags3[ObjectFlags3["JsxAttributes"] = 4096] = "JsxAttributes";
3695
- ObjectFlags3[ObjectFlags3["JSLiteral"] = 8192] = "JSLiteral";
3696
- ObjectFlags3[ObjectFlags3["FreshLiteral"] = 16384] = "FreshLiteral";
3697
- ObjectFlags3[ObjectFlags3["ArrayLiteral"] = 32768] = "ArrayLiteral";
3698
- ObjectFlags3[ObjectFlags3["PrimitiveUnion"] = 65536] = "PrimitiveUnion";
3699
- ObjectFlags3[ObjectFlags3["ContainsWideningType"] = 131072] = "ContainsWideningType";
3700
- ObjectFlags3[ObjectFlags3["ContainsObjectOrArrayLiteral"] = 262144] = "ContainsObjectOrArrayLiteral";
3701
- ObjectFlags3[ObjectFlags3["NonInferrableType"] = 524288] = "NonInferrableType";
3702
- ObjectFlags3[ObjectFlags3["CouldContainTypeVariablesComputed"] = 1048576] = "CouldContainTypeVariablesComputed";
3703
- ObjectFlags3[ObjectFlags3["CouldContainTypeVariables"] = 2097152] = "CouldContainTypeVariables";
3688
+ ObjectFlags3[ObjectFlags3["Instantiated"] = 64] = "Instantiated";
3689
+ ObjectFlags3[ObjectFlags3["ObjectLiteral"] = 128] = "ObjectLiteral";
3690
+ ObjectFlags3[ObjectFlags3["EvolvingArray"] = 256] = "EvolvingArray";
3691
+ ObjectFlags3[ObjectFlags3["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties";
3692
+ ObjectFlags3[ObjectFlags3["ReverseMapped"] = 1024] = "ReverseMapped";
3693
+ ObjectFlags3[ObjectFlags3["JsxAttributes"] = 2048] = "JsxAttributes";
3694
+ ObjectFlags3[ObjectFlags3["JSLiteral"] = 4096] = "JSLiteral";
3695
+ ObjectFlags3[ObjectFlags3["FreshLiteral"] = 8192] = "FreshLiteral";
3696
+ ObjectFlags3[ObjectFlags3["ArrayLiteral"] = 16384] = "ArrayLiteral";
3697
+ ObjectFlags3[ObjectFlags3["PrimitiveUnion"] = 32768] = "PrimitiveUnion";
3698
+ ObjectFlags3[ObjectFlags3["ContainsWideningType"] = 65536] = "ContainsWideningType";
3699
+ ObjectFlags3[ObjectFlags3["ContainsObjectOrArrayLiteral"] = 131072] = "ContainsObjectOrArrayLiteral";
3700
+ ObjectFlags3[ObjectFlags3["NonInferrableType"] = 262144] = "NonInferrableType";
3701
+ ObjectFlags3[ObjectFlags3["CouldContainTypeVariablesComputed"] = 524288] = "CouldContainTypeVariablesComputed";
3702
+ ObjectFlags3[ObjectFlags3["CouldContainTypeVariables"] = 1048576] = "CouldContainTypeVariables";
3704
3703
  ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
3705
- ObjectFlags3[ObjectFlags3["RequiresWidening"] = 393216] = "RequiresWidening";
3706
- ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 917504] = "PropagatingFlags";
3707
- ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 160] = "InstantiatedMapped";
3708
- ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 2623] = "ObjectTypeKindMask";
3709
- ObjectFlags3[ObjectFlags3["ContainsSpread"] = 4194304] = "ContainsSpread";
3710
- ObjectFlags3[ObjectFlags3["ObjectRestType"] = 8388608] = "ObjectRestType";
3711
- ObjectFlags3[ObjectFlags3["InstantiationExpressionType"] = 16777216] = "InstantiationExpressionType";
3712
- ObjectFlags3[ObjectFlags3["IsClassInstanceClone"] = 33554432] = "IsClassInstanceClone";
3713
- ObjectFlags3[ObjectFlags3["IdenticalBaseTypeCalculated"] = 67108864] = "IdenticalBaseTypeCalculated";
3714
- ObjectFlags3[ObjectFlags3["IdenticalBaseTypeExists"] = 134217728] = "IdenticalBaseTypeExists";
3715
- ObjectFlags3[ObjectFlags3["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed";
3716
- ObjectFlags3[ObjectFlags3["IsGenericObjectType"] = 8388608] = "IsGenericObjectType";
3717
- ObjectFlags3[ObjectFlags3["IsGenericIndexType"] = 16777216] = "IsGenericIndexType";
3718
- ObjectFlags3[ObjectFlags3["IsGenericType"] = 25165824] = "IsGenericType";
3719
- ObjectFlags3[ObjectFlags3["ContainsIntersections"] = 33554432] = "ContainsIntersections";
3720
- ObjectFlags3[ObjectFlags3["IsUnknownLikeUnionComputed"] = 67108864] = "IsUnknownLikeUnionComputed";
3721
- ObjectFlags3[ObjectFlags3["IsUnknownLikeUnion"] = 134217728] = "IsUnknownLikeUnion";
3722
- ObjectFlags3[ObjectFlags3["IsNeverIntersectionComputed"] = 33554432] = "IsNeverIntersectionComputed";
3723
- ObjectFlags3[ObjectFlags3["IsNeverIntersection"] = 67108864] = "IsNeverIntersection";
3724
- ObjectFlags3[ObjectFlags3["IsConstrainedTypeVariable"] = 134217728] = "IsConstrainedTypeVariable";
3704
+ ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
3705
+ ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
3706
+ ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
3707
+ ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
3708
+ ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
3709
+ ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
3710
+ ObjectFlags3[ObjectFlags3["InstantiationExpressionType"] = 8388608] = "InstantiationExpressionType";
3711
+ ObjectFlags3[ObjectFlags3["IsClassInstanceClone"] = 16777216] = "IsClassInstanceClone";
3712
+ ObjectFlags3[ObjectFlags3["IdenticalBaseTypeCalculated"] = 33554432] = "IdenticalBaseTypeCalculated";
3713
+ ObjectFlags3[ObjectFlags3["IdenticalBaseTypeExists"] = 67108864] = "IdenticalBaseTypeExists";
3714
+ ObjectFlags3[ObjectFlags3["IsGenericTypeComputed"] = 2097152] = "IsGenericTypeComputed";
3715
+ ObjectFlags3[ObjectFlags3["IsGenericObjectType"] = 4194304] = "IsGenericObjectType";
3716
+ ObjectFlags3[ObjectFlags3["IsGenericIndexType"] = 8388608] = "IsGenericIndexType";
3717
+ ObjectFlags3[ObjectFlags3["IsGenericType"] = 12582912] = "IsGenericType";
3718
+ ObjectFlags3[ObjectFlags3["ContainsIntersections"] = 16777216] = "ContainsIntersections";
3719
+ ObjectFlags3[ObjectFlags3["IsUnknownLikeUnionComputed"] = 33554432] = "IsUnknownLikeUnionComputed";
3720
+ ObjectFlags3[ObjectFlags3["IsUnknownLikeUnion"] = 67108864] = "IsUnknownLikeUnion";
3721
+ ObjectFlags3[ObjectFlags3["IsNeverIntersectionComputed"] = 16777216] = "IsNeverIntersectionComputed";
3722
+ ObjectFlags3[ObjectFlags3["IsNeverIntersection"] = 33554432] = "IsNeverIntersection";
3723
+ ObjectFlags3[ObjectFlags3["IsConstrainedTypeVariable"] = 67108864] = "IsConstrainedTypeVariable";
3725
3724
  return ObjectFlags3;
3726
3725
  })(ObjectFlags || {});
3727
3726
  var SignatureFlags = /* @__PURE__ */ ((SignatureFlags4) => {
@@ -12930,6 +12929,9 @@ function isObjectLiteralOrClassExpressionMethodOrAccessor(node) {
12930
12929
  function isIdentifierTypePredicate(predicate) {
12931
12930
  return predicate && predicate.kind === 1 /* Identifier */;
12932
12931
  }
12932
+ function isThisTypePredicate(predicate) {
12933
+ return predicate && predicate.kind === 0 /* This */;
12934
+ }
12933
12935
  function forEachPropertyAssignment(objectLiteral, key, callback, key2) {
12934
12936
  return forEach(objectLiteral == null ? void 0 : objectLiteral.properties, (property) => {
12935
12937
  if (!isPropertyAssignment(property))
@@ -17042,7 +17044,8 @@ function usesExtensionsOnImports({ imports }, hasExtension2 = or(hasJSFileExtens
17042
17044
  }
17043
17045
  function getModuleSpecifierEndingPreference(preference, resolutionMode, compilerOptions, sourceFile) {
17044
17046
  const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
17045
- if (preference === "js" || resolutionMode === 99 /* ESNext */ && 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) {
17047
+ const moduleResolutionIsNodeNext = 3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */;
17048
+ if (preference === "js" || resolutionMode === 99 /* ESNext */ && moduleResolutionIsNodeNext) {
17046
17049
  if (!shouldAllowImportingTsExtension(compilerOptions)) {
17047
17050
  return 2 /* JsExtension */;
17048
17051
  }
@@ -17060,16 +17063,19 @@ function getModuleSpecifierEndingPreference(preference, resolutionMode, compiler
17060
17063
  return inferPreference();
17061
17064
  function inferPreference() {
17062
17065
  let usesJsExtensions = false;
17063
- const specifiers = sourceFile.imports.length ? sourceFile.imports.map((i) => i.text) : isSourceFileJS(sourceFile) ? getRequiresAtTopOfFile(sourceFile).map((r) => r.arguments[0].text) : emptyArray;
17066
+ const specifiers = sourceFile.imports.length ? sourceFile.imports : isSourceFileJS(sourceFile) ? getRequiresAtTopOfFile(sourceFile).map((r) => r.arguments[0]) : emptyArray;
17064
17067
  for (const specifier of specifiers) {
17065
- if (pathIsRelative(specifier)) {
17066
- if (fileExtensionIsOneOf(specifier, extensionsNotSupportingExtensionlessResolution)) {
17068
+ if (pathIsRelative(specifier.text)) {
17069
+ if (moduleResolutionIsNodeNext && resolutionMode === 1 /* CommonJS */ && getModeForUsageLocation(sourceFile, specifier, compilerOptions) === 99 /* ESNext */) {
17070
+ continue;
17071
+ }
17072
+ if (fileExtensionIsOneOf(specifier.text, extensionsNotSupportingExtensionlessResolution)) {
17067
17073
  continue;
17068
17074
  }
17069
- if (hasTSFileExtension(specifier)) {
17075
+ if (hasTSFileExtension(specifier.text)) {
17070
17076
  return 3 /* TsExtension */;
17071
17077
  }
17072
- if (hasJSFileExtension(specifier)) {
17078
+ if (hasJSFileExtension(specifier.text)) {
17073
17079
  usesJsExtensions = true;
17074
17080
  }
17075
17081
  }
@@ -42626,11 +42632,12 @@ function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignatu
42626
42632
  }
42627
42633
 
42628
42634
  // src/compiler/moduleSpecifiers.ts
42629
- function getPreferences({ importModuleSpecifierPreference, importModuleSpecifierEnding }, compilerOptions, importingSourceFile, oldImportSpecifier) {
42630
- const preferredEnding = getPreferredEnding();
42635
+ function getModuleSpecifierPreferences({ importModuleSpecifierPreference, importModuleSpecifierEnding }, compilerOptions, importingSourceFile, oldImportSpecifier) {
42636
+ const filePreferredEnding = getPreferredEnding();
42631
42637
  return {
42632
42638
  relativePreference: oldImportSpecifier !== void 0 ? isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* Relative */ : 1 /* NonRelative */ : importModuleSpecifierPreference === "relative" ? 0 /* Relative */ : importModuleSpecifierPreference === "non-relative" ? 1 /* NonRelative */ : importModuleSpecifierPreference === "project-relative" ? 3 /* ExternalNonRelative */ : 2 /* Shortest */,
42633
42639
  getAllowedEndingsInPreferredOrder: (syntaxImpliedNodeFormat) => {
42640
+ const preferredEnding = syntaxImpliedNodeFormat !== importingSourceFile.impliedNodeFormat ? getPreferredEnding(syntaxImpliedNodeFormat) : filePreferredEnding;
42634
42641
  if ((syntaxImpliedNodeFormat ?? importingSourceFile.impliedNodeFormat) === 99 /* ESNext */) {
42635
42642
  if (shouldAllowImportingTsExtension(compilerOptions, importingSourceFile.fileName)) {
42636
42643
  return [3 /* TsExtension */, 2 /* JsExtension */];
@@ -42655,7 +42662,7 @@ function getPreferences({ importModuleSpecifierPreference, importModuleSpecifier
42655
42662
  }
42656
42663
  }
42657
42664
  };
42658
- function getPreferredEnding() {
42665
+ function getPreferredEnding(resolutionMode) {
42659
42666
  if (oldImportSpecifier !== void 0) {
42660
42667
  if (hasJSFileExtension(oldImportSpecifier))
42661
42668
  return 2 /* JsExtension */;
@@ -42664,14 +42671,14 @@ function getPreferences({ importModuleSpecifierPreference, importModuleSpecifier
42664
42671
  }
42665
42672
  return getModuleSpecifierEndingPreference(
42666
42673
  importModuleSpecifierEnding,
42667
- importingSourceFile.impliedNodeFormat,
42674
+ resolutionMode ?? importingSourceFile.impliedNodeFormat,
42668
42675
  compilerOptions,
42669
42676
  importingSourceFile
42670
42677
  );
42671
42678
  }
42672
42679
  }
42673
42680
  function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, options = {}) {
42674
- return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getPreferences({}, compilerOptions, importingSourceFile), {}, options);
42681
+ return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getModuleSpecifierPreferences({}, compilerOptions, importingSourceFile), {}, options);
42675
42682
  }
42676
42683
  function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, preferences, userPreferences, options = {}) {
42677
42684
  const info = getInfo(importingSourceFileName, host);
@@ -42743,7 +42750,7 @@ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions
42743
42750
  }
42744
42751
  function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) {
42745
42752
  const info = getInfo(importingSourceFile.fileName, host);
42746
- const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile);
42753
+ const preferences = getModuleSpecifierPreferences(userPreferences, compilerOptions, importingSourceFile);
42747
42754
  const existingSpecifier = forEach(modulePaths, (modulePath) => forEach(
42748
42755
  host.getFileIncludeReasons().get(toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)),
42749
42756
  (reason) => {
@@ -43253,7 +43260,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa
43253
43260
  if (!parts) {
43254
43261
  return void 0;
43255
43262
  }
43256
- const preferences = getPreferences(userPreferences, options, importingSourceFile);
43263
+ const preferences = getModuleSpecifierPreferences(userPreferences, options, importingSourceFile);
43257
43264
  const allowedEndings = preferences.getAllowedEndingsInPreferredOrder();
43258
43265
  let moduleSpecifier = path;
43259
43266
  let isPackageRootPath = false;
@@ -43644,7 +43651,7 @@ function createTypeChecker(host) {
43644
43651
  var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
43645
43652
  var keyofStringsOnly = !!compilerOptions.keyofStringsOnly;
43646
43653
  var defaultIndexFlags = keyofStringsOnly ? 1 /* StringsOnly */ : 0 /* None */;
43647
- var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 16384 /* FreshLiteral */;
43654
+ var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 8192 /* FreshLiteral */;
43648
43655
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
43649
43656
  var checkBinaryExpression = createCheckBinaryExpression();
43650
43657
  var emitResolver = createResolver();
@@ -44147,7 +44154,7 @@ function createTypeChecker(host) {
44147
44154
  var errorTypes = /* @__PURE__ */ new Map();
44148
44155
  var seenIntrinsicNames = /* @__PURE__ */ new Set();
44149
44156
  var anyType = createIntrinsicType(1 /* Any */, "any");
44150
- var autoType = createIntrinsicType(1 /* Any */, "any", 524288 /* NonInferrableType */, "auto");
44157
+ var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */, "auto");
44151
44158
  var wildcardType = createIntrinsicType(
44152
44159
  1 /* Any */,
44153
44160
  "any",
@@ -44164,7 +44171,7 @@ function createTypeChecker(host) {
44164
44171
  );
44165
44172
  var errorType = createIntrinsicType(1 /* Any */, "error");
44166
44173
  var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved");
44167
- var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 131072 /* ContainsWideningType */, "non-inferrable");
44174
+ var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable");
44168
44175
  var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic");
44169
44176
  var unknownType = createIntrinsicType(2 /* Unknown */, "unknown");
44170
44177
  var nonNullUnknownType = createIntrinsicType(
@@ -44175,7 +44182,7 @@ function createTypeChecker(host) {
44175
44182
  "non-null"
44176
44183
  );
44177
44184
  var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined");
44178
- var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 131072 /* ContainsWideningType */, "widening");
44185
+ var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening");
44179
44186
  var missingType = createIntrinsicType(
44180
44187
  32768 /* Undefined */,
44181
44188
  "undefined",
@@ -44192,7 +44199,7 @@ function createTypeChecker(host) {
44192
44199
  "optional"
44193
44200
  );
44194
44201
  var nullType = createIntrinsicType(65536 /* Null */, "null");
44195
- var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 131072 /* ContainsWideningType */, "widening");
44202
+ var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */, "widening");
44196
44203
  var stringType = createIntrinsicType(4 /* String */, "string");
44197
44204
  var numberType = createIntrinsicType(8 /* Number */, "number");
44198
44205
  var bigintType = createIntrinsicType(64 /* BigInt */, "bigint");
@@ -44224,7 +44231,7 @@ function createTypeChecker(host) {
44224
44231
  var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, "symbol");
44225
44232
  var voidType = createIntrinsicType(16384 /* Void */, "void");
44226
44233
  var neverType = createIntrinsicType(131072 /* Never */, "never");
44227
- var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 524288 /* NonInferrableType */, "silent");
44234
+ var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */, "silent");
44228
44235
  var implicitNeverType = createIntrinsicType(
44229
44236
  131072 /* Never */,
44230
44237
  "never",
@@ -44291,7 +44298,7 @@ function createTypeChecker(host) {
44291
44298
  emptyArray,
44292
44299
  emptyArray
44293
44300
  );
44294
- emptyJsxObjectType.objectFlags |= 4096 /* JsxAttributes */;
44301
+ emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */;
44295
44302
  var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */);
44296
44303
  emptyTypeLiteralSymbol.members = createSymbolTable();
44297
44304
  var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, emptyArray);
@@ -44321,7 +44328,7 @@ function createTypeChecker(host) {
44321
44328
  emptyArray,
44322
44329
  emptyArray
44323
44330
  );
44324
- anyFunctionType.objectFlags |= 524288 /* NonInferrableType */;
44331
+ anyFunctionType.objectFlags |= 262144 /* NonInferrableType */;
44325
44332
  var noConstraintType = createAnonymousType(
44326
44333
  /*symbol*/
44327
44334
  void 0,
@@ -47559,7 +47566,7 @@ function createTypeChecker(host) {
47559
47566
  const type = createType(kind);
47560
47567
  type.intrinsicName = intrinsicName;
47561
47568
  type.debugIntrinsicName = debugIntrinsicName;
47562
- type.objectFlags = objectFlags | 1048576 /* CouldContainTypeVariablesComputed */ | 4194304 /* IsGenericTypeComputed */ | 67108864 /* IsUnknownLikeUnionComputed */ | 33554432 /* IsNeverIntersectionComputed */;
47569
+ type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */;
47563
47570
  return type;
47564
47571
  }
47565
47572
  function checkIntrinsicName(name, debug) {
@@ -48148,7 +48155,7 @@ function createTypeChecker(host) {
48148
48155
  return flags & 848330095 /* NodeBuilderFlagsMask */;
48149
48156
  }
48150
48157
  function isClassInstanceSide(type) {
48151
- return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || !!(type.flags & 524288 /* Object */) && !!(getObjectFlags(type) & 33554432 /* IsClassInstanceClone */));
48158
+ return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || !!(type.flags & 524288 /* Object */) && !!(getObjectFlags(type) & 16777216 /* IsClassInstanceClone */));
48152
48159
  }
48153
48160
  function createNodeBuilder() {
48154
48161
  return {
@@ -48237,7 +48244,9 @@ function createTypeChecker(host) {
48237
48244
  context.approximateLength += 3;
48238
48245
  return factory.createKeywordTypeNode(133 /* AnyKeyword */);
48239
48246
  }
48240
- type = context.flags & 536870912 /* NoTypeReduction */ ? getResolvedType(type) : getReducedType(type);
48247
+ if (!(context.flags & 536870912 /* NoTypeReduction */)) {
48248
+ type = getReducedType(type);
48249
+ }
48241
48250
  if (type.flags & 1 /* Any */) {
48242
48251
  if (type.aliasSymbol) {
48243
48252
  return factory.createTypeReferenceNode(symbolToEntityNameNode(type.aliasSymbol), mapToTypeNodes(type.aliasTypeArguments, context));
@@ -48609,7 +48618,7 @@ function createTypeChecker(host) {
48609
48618
  const typeId = type2.id;
48610
48619
  const symbol = type2.symbol;
48611
48620
  if (symbol) {
48612
- const isInstantiationExpressionType = !!(getObjectFlags(type2) & 16777216 /* InstantiationExpressionType */);
48621
+ const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */);
48613
48622
  if (isInstantiationExpressionType) {
48614
48623
  const instantiationExpressionType = type2;
48615
48624
  const existing = instantiationExpressionType.node;
@@ -48947,7 +48956,7 @@ function createTypeChecker(host) {
48947
48956
  typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context));
48948
48957
  }
48949
48958
  for (const info of resolvedType.indexInfos) {
48950
- typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 2048 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0));
48959
+ typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0));
48951
48960
  }
48952
48961
  const properties = resolvedType.properties;
48953
48962
  if (!properties) {
@@ -52191,7 +52200,7 @@ function createTypeChecker(host) {
52191
52200
  ));
52192
52201
  }
52193
52202
  const result = createAnonymousType(symbol, members, emptyArray, emptyArray, getIndexInfosOfType(source));
52194
- result.objectFlags |= 8388608 /* ObjectRestType */;
52203
+ result.objectFlags |= 4194304 /* ObjectRestType */;
52195
52204
  return result;
52196
52205
  }
52197
52206
  function isGenericTypeWithUndefinedConstraint(type) {
@@ -52621,7 +52630,7 @@ function createTypeChecker(host) {
52621
52630
  mergeSymbolTable(exports2, s.exports);
52622
52631
  }
52623
52632
  const type = createAnonymousType(symbol, exports2, emptyArray, emptyArray, emptyArray);
52624
- type.objectFlags |= 8192 /* JSLiteral */;
52633
+ type.objectFlags |= 4096 /* JSLiteral */;
52625
52634
  return type;
52626
52635
  }
52627
52636
  function getAnnotatedTypeForAssignmentDeclaration(declaredType, expression, symbol, declaration) {
@@ -52742,9 +52751,9 @@ function createTypeChecker(host) {
52742
52751
  result.aliasTypeArguments = length(args) ? args : void 0;
52743
52752
  }
52744
52753
  }
52745
- result.objectFlags |= getObjectFlags(type) & 8192 /* JSLiteral */;
52754
+ result.objectFlags |= getObjectFlags(type) & 4096 /* JSLiteral */;
52746
52755
  if (result.symbol && result.symbol.flags & 32 /* Class */ && type === getDeclaredTypeOfClassOrInterface(result.symbol)) {
52747
- result.objectFlags |= 33554432 /* IsClassInstanceClone */;
52756
+ result.objectFlags |= 16777216 /* IsClassInstanceClone */;
52748
52757
  }
52749
52758
  return result;
52750
52759
  }
@@ -52797,7 +52806,7 @@ function createTypeChecker(host) {
52797
52806
  function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) {
52798
52807
  const members = createSymbolTable();
52799
52808
  let stringIndexInfo;
52800
- let objectFlags = 256 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
52809
+ let objectFlags = 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;
52801
52810
  forEach(pattern.elements, (e) => {
52802
52811
  const name = e.propertyName || e.name;
52803
52812
  if (e.dotDotDotToken) {
@@ -52811,7 +52820,7 @@ function createTypeChecker(host) {
52811
52820
  }
52812
52821
  const exprType = getLiteralTypeFromPropertyName(name);
52813
52822
  if (!isTypeUsableAsPropertyName(exprType)) {
52814
- objectFlags |= 1024 /* ObjectLiteralPatternWithComputedProperties */;
52823
+ objectFlags |= 512 /* ObjectLiteralPatternWithComputedProperties */;
52815
52824
  return;
52816
52825
  }
52817
52826
  const text = getPropertyNameFromType(exprType);
@@ -52832,7 +52841,7 @@ function createTypeChecker(host) {
52832
52841
  result.objectFlags |= objectFlags;
52833
52842
  if (includePatternInType) {
52834
52843
  result.pattern = pattern;
52835
- result.objectFlags |= 262144 /* ContainsObjectOrArrayLiteral */;
52844
+ result.objectFlags |= 131072 /* ContainsObjectOrArrayLiteral */;
52836
52845
  }
52837
52846
  return result;
52838
52847
  }
@@ -52850,7 +52859,7 @@ function createTypeChecker(host) {
52850
52859
  if (includePatternInType) {
52851
52860
  result = cloneTypeReference(result);
52852
52861
  result.pattern = pattern;
52853
- result.objectFlags |= 262144 /* ContainsObjectOrArrayLiteral */;
52862
+ result.objectFlags |= 131072 /* ContainsObjectOrArrayLiteral */;
52854
52863
  }
52855
52864
  return result;
52856
52865
  }
@@ -52878,7 +52887,7 @@ function createTypeChecker(host) {
52878
52887
  members.set(member.escapedName, member);
52879
52888
  });
52880
52889
  const type = createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray);
52881
- type.objectFlags |= 256 /* ObjectLiteral */ | 524288 /* NonInferrableType */;
52890
+ type.objectFlags |= 128 /* ObjectLiteral */ | 262144 /* NonInferrableType */;
52882
52891
  links.resolvedType = type;
52883
52892
  }
52884
52893
  return links.resolvedType;
@@ -54666,14 +54675,6 @@ function createTypeChecker(host) {
54666
54675
  type.constructSignatures = constructSignatures;
54667
54676
  }
54668
54677
  }
54669
- function resolveTypeAliasInstantiationMembers(type) {
54670
- const resolved = resolveStructuredTypeMembers(getResolvedTypeAliasInstantiation(type));
54671
- type.members = resolved.members;
54672
- type.properties = resolved.properties;
54673
- type.callSignatures = resolved.callSignatures;
54674
- type.constructSignatures = resolved.constructSignatures;
54675
- type.indexInfos = resolved.indexInfos;
54676
- }
54677
54678
  function replaceIndexedAccess(instantiable, type, replacement) {
54678
54679
  return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
54679
54680
  }
@@ -54940,14 +54941,12 @@ function createTypeChecker(host) {
54940
54941
  resolveTypeReferenceMembers(type);
54941
54942
  } else if (type.objectFlags & 3 /* ClassOrInterface */) {
54942
54943
  resolveClassOrInterfaceMembers(type);
54943
- } else if (type.objectFlags & 2048 /* ReverseMapped */) {
54944
+ } else if (type.objectFlags & 1024 /* ReverseMapped */) {
54944
54945
  resolveReverseMappedTypeMembers(type);
54945
54946
  } else if (type.objectFlags & 16 /* Anonymous */) {
54946
54947
  resolveAnonymousTypeMembers(type);
54947
54948
  } else if (type.objectFlags & 32 /* Mapped */) {
54948
54949
  resolveMappedTypeMembers(type);
54949
- } else if (type.objectFlags & 64 /* TypeAliasInstantiation */) {
54950
- resolveTypeAliasInstantiationMembers(type);
54951
54950
  } else {
54952
54951
  Debug.fail("Unhandled object type " + Debug.formatObjectFlags(type.objectFlags));
54953
54952
  }
@@ -55393,7 +55392,7 @@ function createTypeChecker(host) {
55393
55392
  if (indexInfo) {
55394
55393
  checkFlags |= 32 /* WritePartial */ | (indexInfo.isReadonly ? 8 /* Readonly */ : 0);
55395
55394
  indexTypes = append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type);
55396
- } else if (isObjectLiteralType(type) && !(getObjectFlags(type) & 4194304 /* ContainsSpread */)) {
55395
+ } else if (isObjectLiteralType(type) && !(getObjectFlags(type) & 2097152 /* ContainsSpread */)) {
55397
55396
  checkFlags |= 32 /* WritePartial */;
55398
55397
  indexTypes = append(indexTypes, undefinedType);
55399
55398
  } else {
@@ -55519,22 +55518,22 @@ function createTypeChecker(host) {
55519
55518
  return property && !(getCheckFlags(property) & 16 /* ReadPartial */) ? property : void 0;
55520
55519
  }
55521
55520
  function getReducedType(type) {
55522
- if (type.flags & 1048576 /* Union */ && type.objectFlags & 33554432 /* ContainsIntersections */) {
55521
+ if (type.flags & 1048576 /* Union */ && type.objectFlags & 16777216 /* ContainsIntersections */) {
55523
55522
  return type.resolvedReducedType || (type.resolvedReducedType = getReducedUnionType(type));
55524
55523
  } else if (type.flags & 2097152 /* Intersection */) {
55525
- if (!(type.objectFlags & 33554432 /* IsNeverIntersectionComputed */)) {
55526
- type.objectFlags |= 33554432 /* IsNeverIntersectionComputed */ | (some(getPropertiesOfUnionOrIntersectionType(type), isNeverReducedProperty) ? 67108864 /* IsNeverIntersection */ : 0);
55524
+ if (!(type.objectFlags & 16777216 /* IsNeverIntersectionComputed */)) {
55525
+ type.objectFlags |= 16777216 /* IsNeverIntersectionComputed */ | (some(getPropertiesOfUnionOrIntersectionType(type), isNeverReducedProperty) ? 33554432 /* IsNeverIntersection */ : 0);
55527
55526
  }
55528
- return type.objectFlags & 67108864 /* IsNeverIntersection */ ? neverType : type;
55527
+ return type.objectFlags & 33554432 /* IsNeverIntersection */ ? neverType : type;
55529
55528
  }
55530
- return getResolvedType(type);
55529
+ return type;
55531
55530
  }
55532
55531
  function getReducedUnionType(unionType) {
55533
55532
  const reducedTypes = sameMap(unionType.types, getReducedType);
55534
55533
  if (reducedTypes === unionType.types) {
55535
55534
  return unionType;
55536
55535
  }
55537
- const reduced = getResolvedType(getUnionType(reducedTypes));
55536
+ const reduced = getUnionType(reducedTypes);
55538
55537
  if (reduced.flags & 1048576 /* Union */) {
55539
55538
  reduced.resolvedReducedType = reduced;
55540
55539
  }
@@ -55550,14 +55549,14 @@ function createTypeChecker(host) {
55550
55549
  return !prop.valueDeclaration && !!(getCheckFlags(prop) & 1024 /* ContainsPrivate */);
55551
55550
  }
55552
55551
  function isGenericReducibleType(type) {
55553
- return !!(type.flags & 1048576 /* Union */ && type.objectFlags & 33554432 /* ContainsIntersections */ && some(type.types, isGenericReducibleType) || type.flags & 2097152 /* Intersection */ && isReducibleIntersection(type));
55552
+ return !!(type.flags & 1048576 /* Union */ && type.objectFlags & 16777216 /* ContainsIntersections */ && some(type.types, isGenericReducibleType) || type.flags & 2097152 /* Intersection */ && isReducibleIntersection(type));
55554
55553
  }
55555
55554
  function isReducibleIntersection(type) {
55556
55555
  const uniqueFilled = type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper));
55557
55556
  return getReducedType(uniqueFilled) !== uniqueFilled;
55558
55557
  }
55559
55558
  function elaborateNeverIntersection(errorInfo, type) {
55560
- if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsNeverIntersection */) {
55559
+ if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 33554432 /* IsNeverIntersection */) {
55561
55560
  const neverProp = find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType);
55562
55561
  if (neverProp) {
55563
55562
  return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, typeToString(
@@ -56343,7 +56342,7 @@ function createTypeChecker(host) {
56343
56342
  result |= getObjectFlags(type);
56344
56343
  }
56345
56344
  }
56346
- return result & 917504 /* PropagatingFlags */;
56345
+ return result & 458752 /* PropagatingFlags */;
56347
56346
  }
56348
56347
  function tryCreateTypeReference(target, typeArguments) {
56349
56348
  if (some(typeArguments) && target === emptyGenericType) {
@@ -56430,7 +56429,7 @@ function createTypeChecker(host) {
56430
56429
  return errorType;
56431
56430
  }
56432
56431
  }
56433
- if (node.kind === 183 /* TypeReference */ && (getAliasSymbolForTypeNode(node) || isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length))) {
56432
+ if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) {
56434
56433
  return createDeferredTypeReference(
56435
56434
  type,
56436
56435
  node,
@@ -56443,6 +56442,23 @@ function createTypeChecker(host) {
56443
56442
  }
56444
56443
  return checkNoTypeArguments(node, symbol) ? type : errorType;
56445
56444
  }
56445
+ function getTypeAliasInstantiation(symbol, typeArguments, aliasSymbol, aliasTypeArguments) {
56446
+ const type = getDeclaredTypeOfSymbol(symbol);
56447
+ if (type === intrinsicMarkerType) {
56448
+ const typeKind = intrinsicTypeKinds.get(symbol.escapedName);
56449
+ if (typeKind !== void 0 && typeArguments && typeArguments.length === 1) {
56450
+ return typeKind === 4 /* NoInfer */ ? getNoInferType(typeArguments[0]) : getStringMappingType(symbol, typeArguments[0]);
56451
+ }
56452
+ }
56453
+ const links = getSymbolLinks(symbol);
56454
+ const typeParameters = links.typeParameters;
56455
+ const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);
56456
+ let instantiation = links.instantiations.get(id);
56457
+ if (!instantiation) {
56458
+ links.instantiations.set(id, instantiation = instantiateTypeWithAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), aliasSymbol, aliasTypeArguments));
56459
+ }
56460
+ return instantiation;
56461
+ }
56446
56462
  function getTypeFromTypeAliasReference(node, symbol) {
56447
56463
  if (getCheckFlags(symbol) & 1048576 /* Unresolved */) {
56448
56464
  const typeArguments = typeArgumentsFromTypeReferenceNode(node);
@@ -56493,13 +56509,10 @@ function createTypeChecker(host) {
56493
56509
  const resolved = resolveAlias(aliasSymbol2);
56494
56510
  if (resolved && resolved.flags & 524288 /* TypeAlias */) {
56495
56511
  newAliasSymbol = resolved;
56496
- aliasTypeArguments = typeArgumentsFromTypeReferenceNode(node) ?? [];
56512
+ aliasTypeArguments = typeArgumentsFromTypeReferenceNode(node) || (typeParameters ? [] : void 0);
56497
56513
  }
56498
56514
  }
56499
56515
  }
56500
- if (getObjectFlags(type) & (4 /* Reference */ | 16 /* Anonymous */ | 32 /* Mapped */) && node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) {
56501
- return createDeferredTypeAliasInstantiation(symbol, node, newAliasSymbol, aliasTypeArguments);
56502
- }
56503
56516
  return getTypeAliasInstantiation(symbol, typeArgumentsFromTypeReferenceNode(node), newAliasSymbol, aliasTypeArguments);
56504
56517
  }
56505
56518
  return checkNoTypeArguments(node, symbol) ? type : errorType;
@@ -56509,43 +56522,6 @@ function createTypeChecker(host) {
56509
56522
  const declaration = (_a = symbol.declarations) == null ? void 0 : _a.find(isTypeAlias);
56510
56523
  return !!(declaration && getContainingFunction(declaration));
56511
56524
  }
56512
- function getTypeAliasInstantiation(symbol, typeArguments, aliasSymbol, aliasTypeArguments) {
56513
- const type = getDeclaredTypeOfSymbol(symbol);
56514
- if (type === intrinsicMarkerType) {
56515
- const typeKind = intrinsicTypeKinds.get(symbol.escapedName);
56516
- if (typeKind !== void 0 && typeArguments && typeArguments.length === 1) {
56517
- return typeKind === 4 /* NoInfer */ ? getNoInferType(typeArguments[0]) : getStringMappingType(symbol, typeArguments[0]);
56518
- }
56519
- }
56520
- const links = getSymbolLinks(symbol);
56521
- const typeParameters = links.typeParameters;
56522
- const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);
56523
- let instantiation = links.instantiations.get(id);
56524
- if (!instantiation) {
56525
- links.instantiations.set(id, instantiation = instantiateTypeWithAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), aliasSymbol, aliasTypeArguments));
56526
- }
56527
- return instantiation;
56528
- }
56529
- function createDeferredTypeAliasInstantiation(typeAlias, node, aliasSymbol, aliasTypeArguments) {
56530
- const type = getDeclaredTypeOfSymbol(typeAlias);
56531
- const result = createObjectType(64 /* TypeAliasInstantiation */, type.symbol);
56532
- result.typeAlias = typeAlias;
56533
- result.node = node;
56534
- result.aliasSymbol = aliasSymbol;
56535
- result.aliasTypeArguments = aliasTypeArguments;
56536
- return result;
56537
- }
56538
- function getResolvedType(type) {
56539
- return type.flags & 524288 /* Object */ && type.objectFlags & 64 /* TypeAliasInstantiation */ ? getResolvedTypeAliasInstantiation(type) : type;
56540
- }
56541
- function getResolvedTypeAliasInstantiation(type) {
56542
- if (!type.resolvedType) {
56543
- const typeArguments = typeArgumentsFromTypeReferenceNode(type.node);
56544
- const mappedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments;
56545
- type.resolvedType = getTypeAliasInstantiation(type.typeAlias, mappedTypeArguments, type.aliasSymbol, type.aliasTypeArguments);
56546
- }
56547
- return type.resolvedType;
56548
- }
56549
56525
  function getTypeReferenceName(node) {
56550
56526
  switch (node.kind) {
56551
56527
  case 183 /* TypeReference */:
@@ -57237,7 +57213,7 @@ function createTypeChecker(host) {
57237
57213
  return isNamedTupleMember(member) || isParameter(member) ? member : void 0;
57238
57214
  }
57239
57215
  function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) {
57240
- return isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias));
57216
+ return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias));
57241
57217
  }
57242
57218
  function isResolvedByTypeAlias(node) {
57243
57219
  const parent = node.parent;
@@ -57292,7 +57268,7 @@ function createTypeChecker(host) {
57292
57268
  const target = getArrayOrTupleTargetType(node);
57293
57269
  if (target === emptyGenericType) {
57294
57270
  links.resolvedType = emptyObjectType;
57295
- } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && (getAliasSymbolForTypeNode(node) || isDeferredTypeReferenceNode(node))) {
57271
+ } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) {
57296
57272
  links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference(
57297
57273
  target,
57298
57274
  node,
@@ -57512,12 +57488,12 @@ function createTypeChecker(host) {
57512
57488
  includes |= flags & 473694207 /* IncludesMask */;
57513
57489
  if (flags & 465829888 /* Instantiable */)
57514
57490
  includes |= 33554432 /* IncludesInstantiable */;
57515
- if (flags & 2097152 /* Intersection */ && getObjectFlags(type) & 134217728 /* IsConstrainedTypeVariable */)
57491
+ if (flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */)
57516
57492
  includes |= 536870912 /* IncludesConstrainedTypeVariable */;
57517
57493
  if (type === wildcardType)
57518
57494
  includes |= 8388608 /* IncludesWildcard */;
57519
57495
  if (!strictNullChecks && flags & 98304 /* Nullable */) {
57520
- if (!(getObjectFlags(type) & 131072 /* ContainsWideningType */))
57496
+ if (!(getObjectFlags(type) & 65536 /* ContainsWideningType */))
57521
57497
  includes |= 4194304 /* IncludesNonWideningType */;
57522
57498
  } else {
57523
57499
  const len = typeSet.length;
@@ -57624,7 +57600,7 @@ function createTypeChecker(host) {
57624
57600
  function removeConstrainedTypeVariables(types) {
57625
57601
  const typeVariables = [];
57626
57602
  for (const type of types) {
57627
- if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 134217728 /* IsConstrainedTypeVariable */) {
57603
+ if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
57628
57604
  const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
57629
57605
  pushIfUnique(typeVariables, type.types[index]);
57630
57606
  }
@@ -57632,7 +57608,7 @@ function createTypeChecker(host) {
57632
57608
  for (const typeVariable of typeVariables) {
57633
57609
  const primitives = [];
57634
57610
  for (const type of types) {
57635
- if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 134217728 /* IsConstrainedTypeVariable */) {
57611
+ if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
57636
57612
  const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
57637
57613
  if (type.types[index] === typeVariable) {
57638
57614
  insertType(primitives, type.types[1 - index]);
@@ -57645,7 +57621,7 @@ function createTypeChecker(host) {
57645
57621
  while (i > 0) {
57646
57622
  i--;
57647
57623
  const type = types[i];
57648
- if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 134217728 /* IsConstrainedTypeVariable */) {
57624
+ if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
57649
57625
  const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
57650
57626
  if (type.types[index] === typeVariable && containsType(primitives, type.types[1 - index])) {
57651
57627
  orderedRemoveItemAt(types, i);
@@ -57754,7 +57730,7 @@ function createTypeChecker(host) {
57754
57730
  origin = createOriginUnionOrIntersectionType(1048576 /* Union */, reducedTypes);
57755
57731
  }
57756
57732
  }
57757
- const objectFlags = (includes & 36323331 /* NotPrimitiveUnion */ ? 0 : 65536 /* PrimitiveUnion */) | (includes & 2097152 /* Intersection */ ? 33554432 /* ContainsIntersections */ : 0);
57733
+ const objectFlags = (includes & 36323331 /* NotPrimitiveUnion */ ? 0 : 32768 /* PrimitiveUnion */) | (includes & 2097152 /* Intersection */ ? 16777216 /* ContainsIntersections */ : 0);
57758
57734
  return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);
57759
57735
  }
57760
57736
  function getUnionOrIntersectionTypePredicate(signatures, kind) {
@@ -57905,14 +57881,14 @@ function createTypeChecker(host) {
57905
57881
  }
57906
57882
  function intersectUnionsOfPrimitiveTypes(types) {
57907
57883
  let unionTypes2;
57908
- const index = findIndex(types, (t) => !!(getObjectFlags(t) & 65536 /* PrimitiveUnion */));
57884
+ const index = findIndex(types, (t) => !!(getObjectFlags(t) & 32768 /* PrimitiveUnion */));
57909
57885
  if (index < 0) {
57910
57886
  return false;
57911
57887
  }
57912
57888
  let i = index + 1;
57913
57889
  while (i < types.length) {
57914
57890
  const t = types[i];
57915
- if (getObjectFlags(t) & 65536 /* PrimitiveUnion */) {
57891
+ if (getObjectFlags(t) & 32768 /* PrimitiveUnion */) {
57916
57892
  (unionTypes2 || (unionTypes2 = [types[index]])).push(t);
57917
57893
  orderedRemoveItemAt(types, i);
57918
57894
  } else {
@@ -57933,7 +57909,7 @@ function createTypeChecker(host) {
57933
57909
  }
57934
57910
  }
57935
57911
  }
57936
- types[index] = getUnionTypeFromSortedList(result, 65536 /* PrimitiveUnion */);
57912
+ types[index] = getUnionTypeFromSortedList(result, 32768 /* PrimitiveUnion */);
57937
57913
  return true;
57938
57914
  }
57939
57915
  function createIntersectionType(types, objectFlags, aliasSymbol, aliasTypeArguments) {
@@ -57996,7 +57972,7 @@ function createTypeChecker(host) {
57996
57972
  return neverType;
57997
57973
  }
57998
57974
  }
57999
- objectFlags = 134217728 /* IsConstrainedTypeVariable */;
57975
+ objectFlags = 67108864 /* IsConstrainedTypeVariable */;
58000
57976
  }
58001
57977
  }
58002
57978
  }
@@ -58349,7 +58325,7 @@ function createTypeChecker(host) {
58349
58325
  if (noImplicitAny) {
58350
58326
  return false;
58351
58327
  }
58352
- if (getObjectFlags(type) & 8192 /* JSLiteral */) {
58328
+ if (getObjectFlags(type) & 4096 /* JSLiteral */) {
58353
58329
  return true;
58354
58330
  }
58355
58331
  if (type.flags & 1048576 /* Union */) {
@@ -58597,28 +58573,28 @@ function createTypeChecker(host) {
58597
58573
  return !!getGenericObjectFlags(type);
58598
58574
  }
58599
58575
  function isGenericObjectType(type) {
58600
- return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericObjectType */);
58576
+ return !!(getGenericObjectFlags(type) & 4194304 /* IsGenericObjectType */);
58601
58577
  }
58602
58578
  function isGenericIndexType(type) {
58603
- return !!(getGenericObjectFlags(type) & 16777216 /* IsGenericIndexType */);
58579
+ return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericIndexType */);
58604
58580
  }
58605
58581
  function getGenericObjectFlags(type) {
58606
58582
  if (type.flags & 3145728 /* UnionOrIntersection */) {
58607
- if (!(type.objectFlags & 4194304 /* IsGenericTypeComputed */)) {
58608
- type.objectFlags |= 4194304 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0);
58583
+ if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) {
58584
+ type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0);
58609
58585
  }
58610
- return type.objectFlags & 25165824 /* IsGenericType */;
58586
+ return type.objectFlags & 12582912 /* IsGenericType */;
58611
58587
  }
58612
58588
  if (type.flags & 33554432 /* Substitution */) {
58613
- if (!(type.objectFlags & 4194304 /* IsGenericTypeComputed */)) {
58614
- type.objectFlags |= 4194304 /* IsGenericTypeComputed */ | getGenericObjectFlags(type.baseType) | getGenericObjectFlags(type.constraint);
58589
+ if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) {
58590
+ type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | getGenericObjectFlags(type.baseType) | getGenericObjectFlags(type.constraint);
58615
58591
  }
58616
- return type.objectFlags & 25165824 /* IsGenericType */;
58592
+ return type.objectFlags & 12582912 /* IsGenericType */;
58617
58593
  }
58618
- return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(getResolvedType(type)) || isGenericTupleType(type) ? 8388608 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 16777216 /* IsGenericIndexType */ : 0);
58594
+ return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0);
58619
58595
  }
58620
58596
  function getSimplifiedType(type, writing) {
58621
- return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : getResolvedType(type);
58597
+ return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type;
58622
58598
  }
58623
58599
  function distributeIndexOverObjectType(objectType, indexType, writing) {
58624
58600
  if (objectType.flags & 1048576 /* Union */ || objectType.flags & 2097152 /* Intersection */ && !shouldDeferIndexType(objectType)) {
@@ -59118,7 +59094,7 @@ function createTypeChecker(host) {
59118
59094
  }
59119
59095
  }
59120
59096
  const spread = createAnonymousType(type2.symbol, members, emptyArray, emptyArray, getIndexInfosOfType(type2));
59121
- spread.objectFlags |= 256 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
59097
+ spread.objectFlags |= 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;
59122
59098
  return spread;
59123
59099
  }
59124
59100
  }
@@ -59195,7 +59171,7 @@ function createTypeChecker(host) {
59195
59171
  }
59196
59172
  }
59197
59173
  const spread = createAnonymousType(symbol, members, emptyArray, emptyArray, sameMap(indexInfos, (info) => getIndexInfoWithReadonly(info, readonly)));
59198
- spread.objectFlags |= 256 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */ | 4194304 /* ContainsSpread */ | objectFlags;
59174
+ spread.objectFlags |= 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */ | 2097152 /* ContainsSpread */ | objectFlags;
59199
59175
  return spread;
59200
59176
  }
59201
59177
  function isSpreadableProperty(prop) {
@@ -59616,9 +59592,9 @@ function createTypeChecker(host) {
59616
59592
  return result;
59617
59593
  }
59618
59594
  function getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments) {
59619
- const declaration = type.objectFlags & 4 /* Reference */ ? type.node : type.objectFlags & 16777216 /* InstantiationExpressionType */ ? type.node : type.objectFlags & 64 /* TypeAliasInstantiation */ ? type.node : type.symbol.declarations[0];
59595
+ const declaration = type.objectFlags & 4 /* Reference */ ? type.node : type.objectFlags & 8388608 /* InstantiationExpressionType */ ? type.node : type.symbol.declarations[0];
59620
59596
  const links = getNodeLinks(declaration);
59621
- const target = type.objectFlags & 4 /* Reference */ ? links.resolvedType : type.objectFlags & 128 /* Instantiated */ ? type.target : type;
59597
+ const target = type.objectFlags & 4 /* Reference */ ? links.resolvedType : type.objectFlags & 64 /* Instantiated */ ? type.target : type;
59622
59598
  let typeParameters = links.outerTypeParameters;
59623
59599
  if (!typeParameters) {
59624
59600
  let outerTypeParameters = getOuterTypeParameters(
@@ -59631,8 +59607,8 @@ function createTypeChecker(host) {
59631
59607
  outerTypeParameters = addRange(outerTypeParameters, templateTagParameters);
59632
59608
  }
59633
59609
  typeParameters = outerTypeParameters || emptyArray;
59634
- const allDeclarations = type.objectFlags & (4 /* Reference */ | 16777216 /* InstantiationExpressionType */ | 64 /* TypeAliasInstantiation */) ? [declaration] : type.symbol.declarations;
59635
- typeParameters = (target.objectFlags & (4 /* Reference */ | 16777216 /* InstantiationExpressionType */ | 64 /* TypeAliasInstantiation */) || target.symbol.flags & 8192 /* Method */ || target.symbol.flags & 2048 /* TypeLiteral */) && !target.aliasTypeArguments ? filter(typeParameters, (tp) => some(allDeclarations, (d) => isTypeParameterPossiblyReferenced(tp, d))) : typeParameters;
59610
+ const allDeclarations = type.objectFlags & (4 /* Reference */ | 8388608 /* InstantiationExpressionType */) ? [declaration] : type.symbol.declarations;
59611
+ typeParameters = (target.objectFlags & (4 /* Reference */ | 8388608 /* InstantiationExpressionType */) || target.symbol.flags & 8192 /* Method */ || target.symbol.flags & 2048 /* TypeLiteral */) && !target.aliasTypeArguments ? filter(typeParameters, (tp) => some(allDeclarations, (d) => isTypeParameterPossiblyReferenced(tp, d))) : typeParameters;
59636
59612
  links.outerTypeParameters = typeParameters;
59637
59613
  }
59638
59614
  if (typeParameters.length) {
@@ -59651,13 +59627,13 @@ function createTypeChecker(host) {
59651
59627
  result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);
59652
59628
  target.instantiations.set(id, result);
59653
59629
  const resultObjectFlags = getObjectFlags(result);
59654
- if (result.flags & 3899393 /* ObjectFlagsType */ && !(resultObjectFlags & 1048576 /* CouldContainTypeVariablesComputed */)) {
59630
+ if (result.flags & 3899393 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
59655
59631
  const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables);
59656
- if (!(getObjectFlags(result) & 1048576 /* CouldContainTypeVariablesComputed */)) {
59632
+ if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) {
59657
59633
  if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) {
59658
- result.objectFlags |= 1048576 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 2097152 /* CouldContainTypeVariables */ : 0);
59634
+ result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0);
59659
59635
  } else {
59660
- result.objectFlags |= !resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariablesComputed */ : 0;
59636
+ result.objectFlags |= !resultCouldContainTypeVariables ? 524288 /* CouldContainTypeVariablesComputed */ : 0;
59661
59637
  }
59662
59638
  }
59663
59639
  }
@@ -59787,7 +59763,8 @@ function createTypeChecker(host) {
59787
59763
  ) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType;
59788
59764
  }
59789
59765
  function instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments) {
59790
- const result = createObjectType(type.objectFlags & ~(1048576 /* CouldContainTypeVariablesComputed */ | 2097152 /* CouldContainTypeVariables */) | 128 /* Instantiated */, type.symbol);
59766
+ Debug.assert(type.symbol, "anonymous type must have symbol to be instantiated");
59767
+ const result = createObjectType(type.objectFlags & ~(524288 /* CouldContainTypeVariablesComputed */ | 1048576 /* CouldContainTypeVariables */) | 64 /* Instantiated */, type.symbol);
59791
59768
  if (type.objectFlags & 32 /* Mapped */) {
59792
59769
  result.declaration = type.declaration;
59793
59770
  const origTypeParameter = getTypeParameterFromMappedType(type);
@@ -59795,10 +59772,8 @@ function createTypeChecker(host) {
59795
59772
  result.typeParameter = freshTypeParameter;
59796
59773
  mapper = combineTypeMappers(makeUnaryTypeMapper(origTypeParameter, freshTypeParameter), mapper);
59797
59774
  freshTypeParameter.mapper = mapper;
59798
- } else if (type.objectFlags & 16777216 /* InstantiationExpressionType */) {
59799
- result.node = type.node;
59800
- } else if (type.objectFlags & 64 /* TypeAliasInstantiation */) {
59801
- result.typeAlias = type.typeAlias;
59775
+ }
59776
+ if (type.objectFlags & 8388608 /* InstantiationExpressionType */) {
59802
59777
  result.node = type.node;
59803
59778
  }
59804
59779
  result.target = type;
@@ -59859,13 +59834,13 @@ function createTypeChecker(host) {
59859
59834
  }
59860
59835
  if (flags & 524288 /* Object */) {
59861
59836
  const objectFlags = type.objectFlags;
59862
- if (objectFlags & (4 /* Reference */ | 16 /* Anonymous */ | 32 /* Mapped */ | 64 /* TypeAliasInstantiation */)) {
59837
+ if (objectFlags & (4 /* Reference */ | 16 /* Anonymous */ | 32 /* Mapped */)) {
59863
59838
  if (objectFlags & 4 /* Reference */ && !type.node) {
59864
59839
  const resolvedTypeArguments = type.resolvedTypeArguments;
59865
59840
  const newTypeArguments = instantiateTypes(resolvedTypeArguments, mapper);
59866
59841
  return newTypeArguments !== resolvedTypeArguments ? createNormalizedTypeReference(type.target, newTypeArguments) : type;
59867
59842
  }
59868
- if (objectFlags & 2048 /* ReverseMapped */) {
59843
+ if (objectFlags & 1024 /* ReverseMapped */) {
59869
59844
  return instantiateReverseMappedType(type, mapper);
59870
59845
  }
59871
59846
  return getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments);
@@ -60737,6 +60712,8 @@ function createTypeChecker(host) {
60737
60712
  errorReporter(Diagnostics.Signature_0_must_be_a_type_predicate, signatureToString(source));
60738
60713
  }
60739
60714
  return 0 /* False */;
60715
+ } else if (isThisTypePredicate(targetTypePredicate)) {
60716
+ result &= compareTypes(sourceReturnType, targetReturnType, reportErrors2);
60740
60717
  }
60741
60718
  } else {
60742
60719
  result &= checkMode & 1 /* BivariantCallback */ && compareTypes(
@@ -60801,11 +60778,11 @@ function createTypeChecker(host) {
60801
60778
  }
60802
60779
  function isUnknownLikeUnionType(type) {
60803
60780
  if (strictNullChecks && type.flags & 1048576 /* Union */) {
60804
- if (!(type.objectFlags & 67108864 /* IsUnknownLikeUnionComputed */)) {
60781
+ if (!(type.objectFlags & 33554432 /* IsUnknownLikeUnionComputed */)) {
60805
60782
  const types = type.types;
60806
- type.objectFlags |= 67108864 /* IsUnknownLikeUnionComputed */ | (types.length >= 3 && types[0].flags & 32768 /* Undefined */ && types[1].flags & 65536 /* Null */ && some(types, isEmptyAnonymousObjectType) ? 134217728 /* IsUnknownLikeUnion */ : 0);
60783
+ type.objectFlags |= 33554432 /* IsUnknownLikeUnionComputed */ | (types.length >= 3 && types[0].flags & 32768 /* Undefined */ && types[1].flags & 65536 /* Null */ && some(types, isEmptyAnonymousObjectType) ? 67108864 /* IsUnknownLikeUnion */ : 0);
60807
60784
  }
60808
- return !!(type.objectFlags & 134217728 /* IsUnknownLikeUnion */);
60785
+ return !!(type.objectFlags & 67108864 /* IsUnknownLikeUnion */);
60809
60786
  }
60810
60787
  return false;
60811
60788
  }
@@ -60916,7 +60893,7 @@ function createTypeChecker(host) {
60916
60893
  return true;
60917
60894
  if (s & 65536 /* Null */ && (!strictNullChecks && !(t & 3145728 /* UnionOrIntersection */) || t & 65536 /* Null */))
60918
60895
  return true;
60919
- if (s & 524288 /* Object */ && t & 67108864 /* NonPrimitive */ && !(relation === strictSubtypeRelation && isEmptyAnonymousObjectType(source) && !(getObjectFlags(source) & 16384 /* FreshLiteral */)))
60896
+ if (s & 524288 /* Object */ && t & 67108864 /* NonPrimitive */ && !(relation === strictSubtypeRelation && isEmptyAnonymousObjectType(source) && !(getObjectFlags(source) & 8192 /* FreshLiteral */)))
60920
60897
  return true;
60921
60898
  if (relation === assignableRelation || relation === comparableRelation) {
60922
60899
  if (s & 1 /* Any */)
@@ -60975,11 +60952,11 @@ function createTypeChecker(host) {
60975
60952
  return false;
60976
60953
  }
60977
60954
  function isIgnoredJsxProperty(source, sourceProp) {
60978
- return getObjectFlags(source) & 4096 /* JsxAttributes */ && isHyphenatedJsxName(sourceProp.escapedName);
60955
+ return getObjectFlags(source) & 2048 /* JsxAttributes */ && isHyphenatedJsxName(sourceProp.escapedName);
60979
60956
  }
60980
60957
  function getNormalizedType(type, writing) {
60981
60958
  while (true) {
60982
- const t = isFreshLiteralType(type) ? type.regularType : isGenericTupleType(type) ? getNormalizedTupleType(type, writing) : getObjectFlags(type) & 4 /* Reference */ ? type.node ? createTypeReference(type.target, getTypeArguments(type)) : getSingleBaseForNonAugmentingSubtype(type) || type : getObjectFlags(type) & 64 /* TypeAliasInstantiation */ ? getResolvedTypeAliasInstantiation(type) : type.flags & 3145728 /* UnionOrIntersection */ ? getNormalizedUnionOrIntersectionType(type, writing) : type.flags & 33554432 /* Substitution */ ? writing ? type.baseType : getSubstitutionIntersection(type) : type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : type;
60959
+ const t = isFreshLiteralType(type) ? type.regularType : isGenericTupleType(type) ? getNormalizedTupleType(type, writing) : getObjectFlags(type) & 4 /* Reference */ ? type.node ? createTypeReference(type.target, getTypeArguments(type)) : getSingleBaseForNonAugmentingSubtype(type) || type : type.flags & 3145728 /* UnionOrIntersection */ ? getNormalizedUnionOrIntersectionType(type, writing) : type.flags & 33554432 /* Substitution */ ? writing ? type.baseType : getSubstitutionIntersection(type) : type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : type;
60983
60960
  if (t === type)
60984
60961
  return t;
60985
60962
  type = t;
@@ -61369,7 +61346,7 @@ function createTypeChecker(host) {
61369
61346
  if (relation === comparableRelation && !(target2.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target2, source2, relation) || isSimpleTypeRelatedTo(source2, target2, relation, reportErrors2 ? reportError : void 0))
61370
61347
  return -1 /* True */;
61371
61348
  if (source2.flags & 469499904 /* StructuredOrInstantiable */ || target2.flags & 469499904 /* StructuredOrInstantiable */) {
61372
- const isPerformingExcessPropertyChecks = !(intersectionState & 2 /* Target */) && (isObjectLiteralType(source2) && getObjectFlags(source2) & 16384 /* FreshLiteral */);
61349
+ const isPerformingExcessPropertyChecks = !(intersectionState & 2 /* Target */) && (isObjectLiteralType(source2) && getObjectFlags(source2) & 8192 /* FreshLiteral */);
61373
61350
  if (isPerformingExcessPropertyChecks) {
61374
61351
  if (hasExcessProperties(source2, target2, reportErrors2)) {
61375
61352
  if (reportErrors2) {
@@ -61379,7 +61356,7 @@ function createTypeChecker(host) {
61379
61356
  }
61380
61357
  }
61381
61358
  const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (402784252 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2));
61382
- const isComparingJsxAttributes = !!(getObjectFlags(source2) & 4096 /* JsxAttributes */);
61359
+ const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */);
61383
61360
  if (isPerformingCommonPropertyChecks && !hasCommonProperties(source2, target2, isComparingJsxAttributes)) {
61384
61361
  if (reportErrors2) {
61385
61362
  const sourceString = typeToString(originalSource.aliasSymbol ? originalSource : source2);
@@ -61444,7 +61421,7 @@ function createTypeChecker(host) {
61444
61421
  tryElaborateErrorsForPrimitivesAndObjects(source2, target2);
61445
61422
  } else if (source2.symbol && source2.flags & 524288 /* Object */ && globalObjectType === source2) {
61446
61423
  reportError(Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);
61447
- } else if (getObjectFlags(source2) & 4096 /* JsxAttributes */ && target2.flags & 2097152 /* Intersection */) {
61424
+ } else if (getObjectFlags(source2) & 2048 /* JsxAttributes */ && target2.flags & 2097152 /* Intersection */) {
61448
61425
  const targetTypes = target2.types;
61449
61426
  const intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes, errorNode);
61450
61427
  const intrinsicClassAttributes = getJsxType(JsxNames.IntrinsicClassAttributes, errorNode);
@@ -61475,7 +61452,7 @@ function createTypeChecker(host) {
61475
61452
  if (source2.flags & 3145728 /* UnionOrIntersection */ && target2.flags & 3145728 /* UnionOrIntersection */) {
61476
61453
  const sourceUnionOrIntersection = source2;
61477
61454
  const targetUnionOrIntersection = target2;
61478
- if (sourceUnionOrIntersection.objectFlags & targetUnionOrIntersection.objectFlags & 65536 /* PrimitiveUnion */) {
61455
+ if (sourceUnionOrIntersection.objectFlags & targetUnionOrIntersection.objectFlags & 32768 /* PrimitiveUnion */) {
61479
61456
  return;
61480
61457
  }
61481
61458
  const sourceSize = sourceUnionOrIntersection.types.length;
@@ -61509,10 +61486,10 @@ function createTypeChecker(host) {
61509
61486
  }
61510
61487
  function hasExcessProperties(source2, target2, reportErrors2) {
61511
61488
  var _a2;
61512
- if (!isExcessPropertyCheckTarget(target2) || !noImplicitAny && getObjectFlags(target2) & 8192 /* JSLiteral */) {
61489
+ if (!isExcessPropertyCheckTarget(target2) || !noImplicitAny && getObjectFlags(target2) & 4096 /* JSLiteral */) {
61513
61490
  return false;
61514
61491
  }
61515
- const isComparingJsxAttributes = !!(getObjectFlags(source2) & 4096 /* JsxAttributes */);
61492
+ const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */);
61516
61493
  if ((relation === assignableRelation || relation === comparableRelation) && (isTypeSubsetOf(globalObjectType, target2) || !isComparingJsxAttributes && isEmptyObjectType(target2))) {
61517
61494
  return false;
61518
61495
  }
@@ -61651,7 +61628,7 @@ function createTypeChecker(host) {
61651
61628
  if (containsType(targetTypes, source2)) {
61652
61629
  return -1 /* True */;
61653
61630
  }
61654
- if (relation !== comparableRelation && getObjectFlags(target2) & 65536 /* PrimitiveUnion */ && !(source2.flags & 1024 /* EnumLiteral */) && (source2.flags & (128 /* StringLiteral */ | 512 /* BooleanLiteral */ | 2048 /* BigIntLiteral */) || (relation === subtypeRelation || relation === strictSubtypeRelation) && source2.flags & 256 /* NumberLiteral */)) {
61631
+ if (relation !== comparableRelation && getObjectFlags(target2) & 32768 /* PrimitiveUnion */ && !(source2.flags & 1024 /* EnumLiteral */) && (source2.flags & (128 /* StringLiteral */ | 512 /* BooleanLiteral */ | 2048 /* BigIntLiteral */) || (relation === subtypeRelation || relation === strictSubtypeRelation) && source2.flags & 256 /* NumberLiteral */)) {
61655
61632
  const alternateForm = source2 === source2.regularType ? source2.freshType : source2.regularType;
61656
61633
  const primitive = source2.flags & 128 /* StringLiteral */ ? stringType : source2.flags & 256 /* NumberLiteral */ ? numberType : source2.flags & 2048 /* BigIntLiteral */ ? bigintType : void 0;
61657
61634
  return primitive && containsType(targetTypes, primitive) || alternateForm && containsType(targetTypes, alternateForm) ? -1 /* True */ : 0 /* False */;
@@ -62055,7 +62032,7 @@ function createTypeChecker(host) {
62055
62032
  false,
62056
62033
  0 /* None */
62057
62034
  );
62058
- if (result2 && isObjectLiteralType(source2) && getObjectFlags(source2) & 16384 /* FreshLiteral */) {
62035
+ if (result2 && isObjectLiteralType(source2) && getObjectFlags(source2) & 8192 /* FreshLiteral */) {
62059
62036
  result2 &= indexSignaturesRelatedTo(
62060
62037
  source2,
62061
62038
  target2,
@@ -62065,7 +62042,7 @@ function createTypeChecker(host) {
62065
62042
  0 /* None */
62066
62043
  );
62067
62044
  }
62068
- } else if (result2 && isNonGenericObjectType(target2) && !isArrayOrTupleType(target2) && source2.flags & 2097152 /* Intersection */ && getApparentType(source2).flags & 3670016 /* StructuredType */ && !some(source2.types, (t) => t === target2 || !!(getObjectFlags(t) & 524288 /* NonInferrableType */))) {
62045
+ } else if (result2 && isNonGenericObjectType(target2) && !isArrayOrTupleType(target2) && source2.flags & 2097152 /* Intersection */ && getApparentType(source2).flags & 3670016 /* StructuredType */ && !some(source2.types, (t) => t === target2 || !!(getObjectFlags(t) & 262144 /* NonInferrableType */))) {
62069
62046
  result2 &= propertiesRelatedTo(
62070
62047
  source2,
62071
62048
  target2,
@@ -62566,7 +62543,7 @@ function createTypeChecker(host) {
62566
62543
  if (constraint !== source2) {
62567
62544
  return isRelatedTo(constraint, target2, 1 /* Source */, reportErrors2);
62568
62545
  }
62569
- } else if ((relation === subtypeRelation || relation === strictSubtypeRelation) && isEmptyObjectType(target2) && getObjectFlags(target2) & 16384 /* FreshLiteral */ && !isEmptyObjectType(source2)) {
62546
+ } else if ((relation === subtypeRelation || relation === strictSubtypeRelation) && isEmptyObjectType(target2) && getObjectFlags(target2) & 8192 /* FreshLiteral */ && !isEmptyObjectType(source2)) {
62570
62547
  return 0 /* False */;
62571
62548
  }
62572
62549
  if (sourceFlags & (524288 /* Object */ | 2097152 /* Intersection */) && targetFlags & 524288 /* Object */) {
@@ -63098,7 +63075,7 @@ function createTypeChecker(host) {
63098
63075
  const incompatibleReporter = kind === 1 /* Construct */ ? reportIncompatibleConstructSignatureReturn : reportIncompatibleCallSignatureReturn;
63099
63076
  const sourceObjectFlags = getObjectFlags(source2);
63100
63077
  const targetObjectFlags = getObjectFlags(target2);
63101
- if (sourceObjectFlags & 128 /* Instantiated */ && targetObjectFlags & 128 /* Instantiated */ && source2.symbol === target2.symbol || sourceObjectFlags & 4 /* Reference */ && targetObjectFlags & 4 /* Reference */ && source2.target === target2.target) {
63078
+ if (sourceObjectFlags & 64 /* Instantiated */ && targetObjectFlags & 64 /* Instantiated */ && source2.symbol === target2.symbol || sourceObjectFlags & 4 /* Reference */ && targetObjectFlags & 4 /* Reference */ && source2.target === target2.target) {
63102
63079
  Debug.assertEqual(sourceSignatures.length, targetSignatures.length);
63103
63080
  for (let i = 0; i < targetSignatures.length; i++) {
63104
63081
  const related = signatureRelatedTo(
@@ -63314,7 +63291,7 @@ function createTypeChecker(host) {
63314
63291
  if (sourceInfo) {
63315
63292
  return indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors2, intersectionState);
63316
63293
  }
63317
- if (!(intersectionState & 1 /* Source */) && (relation !== strictSubtypeRelation || getObjectFlags(source2) & 16384 /* FreshLiteral */) && isObjectTypeWithInferableIndex(source2)) {
63294
+ if (!(intersectionState & 1 /* Source */) && (relation !== strictSubtypeRelation || getObjectFlags(source2) & 8192 /* FreshLiteral */) && isObjectTypeWithInferableIndex(source2)) {
63318
63295
  return membersRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState);
63319
63296
  }
63320
63297
  if (reportErrors2) {
@@ -63588,11 +63565,11 @@ function createTypeChecker(host) {
63588
63565
  }
63589
63566
  function isDeeplyNestedType(type, stack, depth, maxDepth = 3) {
63590
63567
  if (depth >= maxDepth) {
63591
- if ((getObjectFlags(type) & 160 /* InstantiatedMapped */) === 160 /* InstantiatedMapped */) {
63568
+ if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) {
63592
63569
  type = getMappedTargetWithSymbol(type);
63593
63570
  }
63594
63571
  if (type.flags & 2097152 /* Intersection */) {
63595
- return some(type.types, (t) => isDeeplyNestedType(getResolvedType(t), stack, depth, maxDepth));
63572
+ return some(type.types, (t) => isDeeplyNestedType(t, stack, depth, maxDepth));
63596
63573
  }
63597
63574
  const identity2 = getRecursionIdentity(type);
63598
63575
  let count = 0;
@@ -63614,17 +63591,17 @@ function createTypeChecker(host) {
63614
63591
  }
63615
63592
  function getMappedTargetWithSymbol(type) {
63616
63593
  let target;
63617
- while ((getObjectFlags(type) & 160 /* InstantiatedMapped */) === 160 /* InstantiatedMapped */ && (target = getModifiersTypeFromMappedType(type)) && (target.symbol || target.flags & 2097152 /* Intersection */ && some(target.types, (t) => !!t.symbol))) {
63594
+ while ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && (target = getModifiersTypeFromMappedType(type)) && (target.symbol || target.flags & 2097152 /* Intersection */ && some(target.types, (t) => !!t.symbol))) {
63618
63595
  type = target;
63619
63596
  }
63620
63597
  return type;
63621
63598
  }
63622
63599
  function hasMatchingRecursionIdentity(type, identity2) {
63623
- if ((getObjectFlags(type) & 160 /* InstantiatedMapped */) === 160 /* InstantiatedMapped */) {
63600
+ if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) {
63624
63601
  type = getMappedTargetWithSymbol(type);
63625
63602
  }
63626
63603
  if (type.flags & 2097152 /* Intersection */) {
63627
- return some(type.types, (t) => hasMatchingRecursionIdentity(getResolvedType(t), identity2));
63604
+ return some(type.types, (t) => hasMatchingRecursionIdentity(t, identity2));
63628
63605
  }
63629
63606
  return getRecursionIdentity(type) === identity2;
63630
63607
  }
@@ -63807,10 +63784,10 @@ function createTypeChecker(host) {
63807
63784
  if (!(getObjectFlags(type) & 4 /* Reference */) || !(getObjectFlags(type.target) & 3 /* ClassOrInterface */)) {
63808
63785
  return void 0;
63809
63786
  }
63810
- if (getObjectFlags(type) & 67108864 /* IdenticalBaseTypeCalculated */) {
63811
- return getObjectFlags(type) & 134217728 /* IdenticalBaseTypeExists */ ? type.cachedEquivalentBaseType : void 0;
63787
+ if (getObjectFlags(type) & 33554432 /* IdenticalBaseTypeCalculated */) {
63788
+ return getObjectFlags(type) & 67108864 /* IdenticalBaseTypeExists */ ? type.cachedEquivalentBaseType : void 0;
63812
63789
  }
63813
- type.objectFlags |= 67108864 /* IdenticalBaseTypeCalculated */;
63790
+ type.objectFlags |= 33554432 /* IdenticalBaseTypeCalculated */;
63814
63791
  const target = type.target;
63815
63792
  if (getObjectFlags(target) & 1 /* Class */) {
63816
63793
  const baseTypeNode = getBaseTypeNodeOfClass(target);
@@ -63829,7 +63806,7 @@ function createTypeChecker(host) {
63829
63806
  if (length(getTypeArguments(type)) > length(target.typeParameters)) {
63830
63807
  instantiatedBase = getTypeWithThisArgument(instantiatedBase, last(getTypeArguments(type)));
63831
63808
  }
63832
- type.objectFlags |= 134217728 /* IdenticalBaseTypeExists */;
63809
+ type.objectFlags |= 67108864 /* IdenticalBaseTypeExists */;
63833
63810
  return type.cachedEquivalentBaseType = instantiatedBase;
63834
63811
  }
63835
63812
  function isEmptyLiteralType(type) {
@@ -64014,7 +63991,7 @@ function createTypeChecker(host) {
64014
63991
  }
64015
63992
  function isObjectTypeWithInferableIndex(type) {
64016
63993
  const objectFlags = getObjectFlags(type);
64017
- return type.flags & 2097152 /* Intersection */ ? every(type.types, isObjectTypeWithInferableIndex) : !!(type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */ | 384 /* Enum */ | 512 /* ValueModule */)) !== 0 && !(type.symbol.flags & 32 /* Class */) && !typeHasCallOrConstructSignatures(type)) || !!(objectFlags & 8388608 /* ObjectRestType */) || !!(objectFlags & 2048 /* ReverseMapped */ && isObjectTypeWithInferableIndex(type.source));
63994
+ return type.flags & 2097152 /* Intersection */ ? every(type.types, isObjectTypeWithInferableIndex) : !!(type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */ | 384 /* Enum */ | 512 /* ValueModule */)) !== 0 && !(type.symbol.flags & 32 /* Class */) && !typeHasCallOrConstructSignatures(type)) || !!(objectFlags & 4194304 /* ObjectRestType */) || !!(objectFlags & 1024 /* ReverseMapped */ && isObjectTypeWithInferableIndex(type.source));
64018
63995
  }
64019
63996
  function createSymbolWithType(source, type) {
64020
63997
  const symbol = createSymbol(source.flags, source.escapedName, getCheckFlags(source) & 8 /* Readonly */);
@@ -64041,7 +64018,7 @@ function createTypeChecker(host) {
64041
64018
  return members;
64042
64019
  }
64043
64020
  function getRegularTypeOfObjectLiteral(type) {
64044
- if (!(isObjectLiteralType(type) && getObjectFlags(type) & 16384 /* FreshLiteral */)) {
64021
+ if (!(isObjectLiteralType(type) && getObjectFlags(type) & 8192 /* FreshLiteral */)) {
64045
64022
  return type;
64046
64023
  }
64047
64024
  const regularType = type.regularType;
@@ -64052,7 +64029,7 @@ function createTypeChecker(host) {
64052
64029
  const members = transformTypeOfMembers(type, getRegularTypeOfObjectLiteral);
64053
64030
  const regularNew = createAnonymousType(resolved.symbol, members, resolved.callSignatures, resolved.constructSignatures, resolved.indexInfos);
64054
64031
  regularNew.flags = resolved.flags;
64055
- regularNew.objectFlags |= resolved.objectFlags & ~16384 /* FreshLiteral */;
64032
+ regularNew.objectFlags |= resolved.objectFlags & ~8192 /* FreshLiteral */;
64056
64033
  type.regularType = regularNew;
64057
64034
  return regularNew;
64058
64035
  }
@@ -64080,7 +64057,7 @@ function createTypeChecker(host) {
64080
64057
  if (!context.resolvedProperties) {
64081
64058
  const names = /* @__PURE__ */ new Map();
64082
64059
  for (const t of getSiblingsOfContext(context)) {
64083
- if (isObjectLiteralType(t) && !(getObjectFlags(t) & 4194304 /* ContainsSpread */)) {
64060
+ if (isObjectLiteralType(t) && !(getObjectFlags(t) & 2097152 /* ContainsSpread */)) {
64084
64061
  for (const prop of getPropertiesOfType(t)) {
64085
64062
  names.set(prop.escapedName, prop);
64086
64063
  }
@@ -64127,7 +64104,7 @@ function createTypeChecker(host) {
64127
64104
  }
64128
64105
  }
64129
64106
  const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly)));
64130
- result.objectFlags |= getObjectFlags(type) & (8192 /* JSLiteral */ | 524288 /* NonInferrableType */);
64107
+ result.objectFlags |= getObjectFlags(type) & (4096 /* JSLiteral */ | 262144 /* NonInferrableType */);
64131
64108
  return result;
64132
64109
  }
64133
64110
  function getWidenedType(type) {
@@ -64138,7 +64115,7 @@ function createTypeChecker(host) {
64138
64115
  );
64139
64116
  }
64140
64117
  function getWidenedTypeWithContext(type, context) {
64141
- if (getObjectFlags(type) & 393216 /* RequiresWidening */) {
64118
+ if (getObjectFlags(type) & 196608 /* RequiresWidening */) {
64142
64119
  if (context === void 0 && type.widened) {
64143
64120
  return type.widened;
64144
64121
  }
@@ -64171,7 +64148,7 @@ function createTypeChecker(host) {
64171
64148
  }
64172
64149
  function reportWideningErrorsInType(type) {
64173
64150
  let errorReported = false;
64174
- if (getObjectFlags(type) & 131072 /* ContainsWideningType */) {
64151
+ if (getObjectFlags(type) & 65536 /* ContainsWideningType */) {
64175
64152
  if (type.flags & 1048576 /* Union */) {
64176
64153
  if (some(type.types, isEmptyObjectType)) {
64177
64154
  errorReported = true;
@@ -64193,7 +64170,7 @@ function createTypeChecker(host) {
64193
64170
  if (isObjectLiteralType(type)) {
64194
64171
  for (const p of getPropertiesOfObjectType(type)) {
64195
64172
  const t = getTypeOfSymbol(p);
64196
- if (getObjectFlags(t) & 131072 /* ContainsWideningType */) {
64173
+ if (getObjectFlags(t) & 65536 /* ContainsWideningType */) {
64197
64174
  if (!reportWideningErrorsInType(t)) {
64198
64175
  error(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t)));
64199
64176
  }
@@ -64281,7 +64258,7 @@ function createTypeChecker(host) {
64281
64258
  }
64282
64259
  function reportErrorsFromWidening(declaration, type, wideningKind) {
64283
64260
  addLazyDiagnostic(() => {
64284
- if (noImplicitAny && getObjectFlags(type) & 131072 /* ContainsWideningType */ && (!wideningKind || !getContextualSignatureForFunctionLikeDeclaration(declaration))) {
64261
+ if (noImplicitAny && getObjectFlags(type) & 65536 /* ContainsWideningType */ && (!wideningKind || !getContextualSignatureForFunctionLikeDeclaration(declaration))) {
64285
64262
  if (!reportWideningErrorsInType(type)) {
64286
64263
  reportImplicitAny(declaration, type, wideningKind);
64287
64264
  }
@@ -64418,12 +64395,12 @@ function createTypeChecker(host) {
64418
64395
  }
64419
64396
  function couldContainTypeVariables(type) {
64420
64397
  const objectFlags = getObjectFlags(type);
64421
- if (objectFlags & 1048576 /* CouldContainTypeVariablesComputed */) {
64422
- return !!(objectFlags & 2097152 /* CouldContainTypeVariables */);
64398
+ if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) {
64399
+ return !!(objectFlags & 1048576 /* CouldContainTypeVariables */);
64423
64400
  }
64424
- const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 2048 /* ReverseMapped */ | 8388608 /* ObjectRestType */ | 16777216 /* InstantiationExpressionType */ | 64 /* TypeAliasInstantiation */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables));
64401
+ const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables));
64425
64402
  if (type.flags & 3899393 /* ObjectFlagsType */) {
64426
- type.objectFlags |= 1048576 /* CouldContainTypeVariablesComputed */ | (result ? 2097152 /* CouldContainTypeVariables */ : 0);
64403
+ type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0);
64427
64404
  }
64428
64405
  return result;
64429
64406
  }
@@ -64487,7 +64464,7 @@ function createTypeChecker(host) {
64487
64464
  return type;
64488
64465
  }
64489
64466
  function isPartiallyInferableType(type) {
64490
- return !(getObjectFlags(type) & 524288 /* NonInferrableType */) || isObjectLiteralType(type) && some(getPropertiesOfType(type), (prop) => isPartiallyInferableType(getTypeOfSymbol(prop))) || isTupleType(type) && some(getElementTypes(type), isPartiallyInferableType);
64467
+ return !(getObjectFlags(type) & 262144 /* NonInferrableType */) || isObjectLiteralType(type) && some(getPropertiesOfType(type), (prop) => isPartiallyInferableType(getTypeOfSymbol(prop))) || isTupleType(type) && some(getElementTypes(type), isPartiallyInferableType);
64491
64468
  }
64492
64469
  function createReverseMappedType(source, target, constraint) {
64493
64470
  if (!(getIndexInfoOfType(source, stringType) || getPropertiesOfType(source).length !== 0 && isPartiallyInferableType(source))) {
@@ -64502,7 +64479,7 @@ function createTypeChecker(host) {
64502
64479
  return createTupleType(elementTypes, elementFlags, source.target.readonly, source.target.labeledElementDeclarations);
64503
64480
  }
64504
64481
  const reversed = createObjectType(
64505
- 2048 /* ReverseMapped */ | 16 /* Anonymous */,
64482
+ 1024 /* ReverseMapped */ | 16 /* Anonymous */,
64506
64483
  /*symbol*/
64507
64484
  void 0
64508
64485
  );
@@ -64723,8 +64700,6 @@ function createTypeChecker(host) {
64723
64700
  propagationType = savePropagationType;
64724
64701
  return;
64725
64702
  }
64726
- source = getResolvedType(source);
64727
- target = getResolvedType(target);
64728
64703
  if (source.aliasSymbol && source.aliasSymbol === target.aliasSymbol) {
64729
64704
  if (source.aliasTypeArguments) {
64730
64705
  const params = getSymbolLinks(source.aliasSymbol).typeParameters;
@@ -64775,7 +64750,7 @@ function createTypeChecker(host) {
64775
64750
  }
64776
64751
  const inference = getInferenceInfoForType(target);
64777
64752
  if (inference) {
64778
- if (getObjectFlags(source) & 524288 /* NonInferrableType */ || source === nonInferrableAnyType) {
64753
+ if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source === nonInferrableAnyType) {
64779
64754
  return;
64780
64755
  }
64781
64756
  if (!inference.isFixed) {
@@ -65059,7 +65034,7 @@ function createTypeChecker(host) {
65059
65034
  inferWithPriority(
65060
65035
  inferredType,
65061
65036
  inference.typeParameter,
65062
- getObjectFlags(source) & 524288 /* NonInferrableType */ ? 16 /* PartialHomomorphicMappedType */ : 8 /* HomomorphicMappedType */
65037
+ getObjectFlags(source) & 262144 /* NonInferrableType */ ? 16 /* PartialHomomorphicMappedType */ : 8 /* HomomorphicMappedType */
65063
65038
  );
65064
65039
  }
65065
65040
  }
@@ -65314,10 +65289,10 @@ function createTypeChecker(host) {
65314
65289
  return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */);
65315
65290
  }
65316
65291
  function isObjectLiteralType(type) {
65317
- return !!(getObjectFlags(type) & 256 /* ObjectLiteral */);
65292
+ return !!(getObjectFlags(type) & 128 /* ObjectLiteral */);
65318
65293
  }
65319
65294
  function isObjectOrArrayLiteralType(type) {
65320
- return !!(getObjectFlags(type) & (256 /* ObjectLiteral */ | 32768 /* ArrayLiteral */));
65295
+ return !!(getObjectFlags(type) & (128 /* ObjectLiteral */ | 16384 /* ArrayLiteral */));
65321
65296
  }
65322
65297
  function unionObjectAndArrayLiteralCandidates(candidates) {
65323
65298
  if (candidates.length > 1) {
@@ -65645,7 +65620,7 @@ function createTypeChecker(host) {
65645
65620
  }
65646
65621
  function getKeyPropertyName(unionType) {
65647
65622
  const types = unionType.types;
65648
- if (types.length < 10 || getObjectFlags(unionType) & 65536 /* PrimitiveUnion */ || countWhere(types, (t) => !!(t.flags & (524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */))) < 10) {
65623
+ if (types.length < 10 || getObjectFlags(unionType) & 32768 /* PrimitiveUnion */ || countWhere(types, (t) => !!(t.flags & (524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */))) < 10) {
65649
65624
  return void 0;
65650
65625
  }
65651
65626
  if (unionType.keyPropertyName === void 0) {
@@ -66034,7 +66009,7 @@ function createTypeChecker(host) {
66034
66009
  }
66035
66010
  return getUnionTypeFromSortedList(
66036
66011
  filtered,
66037
- type.objectFlags & (65536 /* PrimitiveUnion */ | 33554432 /* ContainsIntersections */),
66012
+ type.objectFlags & (32768 /* PrimitiveUnion */ | 16777216 /* ContainsIntersections */),
66038
66013
  /*aliasSymbol*/
66039
66014
  void 0,
66040
66015
  /*aliasTypeArguments*/
@@ -66096,7 +66071,7 @@ function createTypeChecker(host) {
66096
66071
  return incomplete ? { flags: 0, type: type.flags & 131072 /* Never */ ? silentNeverType : type } : type;
66097
66072
  }
66098
66073
  function createEvolvingArrayType(elementType) {
66099
- const result = createObjectType(512 /* EvolvingArray */);
66074
+ const result = createObjectType(256 /* EvolvingArray */);
66100
66075
  result.elementType = elementType;
66101
66076
  return result;
66102
66077
  }
@@ -66116,16 +66091,16 @@ function createTypeChecker(host) {
66116
66091
  return evolvingArrayType.finalArrayType || (evolvingArrayType.finalArrayType = createFinalArrayType(evolvingArrayType.elementType));
66117
66092
  }
66118
66093
  function finalizeEvolvingArrayType(type) {
66119
- return getObjectFlags(type) & 512 /* EvolvingArray */ ? getFinalArrayType(type) : type;
66094
+ return getObjectFlags(type) & 256 /* EvolvingArray */ ? getFinalArrayType(type) : type;
66120
66095
  }
66121
66096
  function getElementTypeOfEvolvingArrayType(type) {
66122
- return getObjectFlags(type) & 512 /* EvolvingArray */ ? type.elementType : neverType;
66097
+ return getObjectFlags(type) & 256 /* EvolvingArray */ ? type.elementType : neverType;
66123
66098
  }
66124
66099
  function isEvolvingArrayTypeList(types) {
66125
66100
  let hasEvolvingArrayType = false;
66126
66101
  for (const t of types) {
66127
66102
  if (!(t.flags & 131072 /* Never */)) {
66128
- if (!(getObjectFlags(t) & 512 /* EvolvingArray */)) {
66103
+ if (!(getObjectFlags(t) & 256 /* EvolvingArray */)) {
66129
66104
  return false;
66130
66105
  }
66131
66106
  hasEvolvingArrayType = true;
@@ -66429,7 +66404,7 @@ function createTypeChecker(host) {
66429
66404
  const sharedFlowStart = sharedFlowCount;
66430
66405
  const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode));
66431
66406
  sharedFlowCount = sharedFlowStart;
66432
- const resultType = getObjectFlags(evolvedType) & 512 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType);
66407
+ const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType);
66433
66408
  if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 235 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) {
66434
66409
  return declaredType;
66435
66410
  }
@@ -66616,7 +66591,7 @@ function createTypeChecker(host) {
66616
66591
  if (isMatchingReference(reference, getReferenceCandidate(expr))) {
66617
66592
  const flowType = getTypeAtFlowNode(flow.antecedent);
66618
66593
  const type = getTypeFromFlowType(flowType);
66619
- if (getObjectFlags(type) & 512 /* EvolvingArray */) {
66594
+ if (getObjectFlags(type) & 256 /* EvolvingArray */) {
66620
66595
  let evolvedType2 = type;
66621
66596
  if (node.kind === 213 /* CallExpression */) {
66622
66597
  for (const arg of node.arguments) {
@@ -67469,7 +67444,7 @@ function createTypeChecker(host) {
67469
67444
  location = location.parent;
67470
67445
  }
67471
67446
  if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) {
67472
- const type = getResolvedType(removeOptionalTypeMarker(
67447
+ const type = removeOptionalTypeMarker(
67473
67448
  isWriteAccess(location) && location.kind === 211 /* PropertyAccessExpression */ ? checkPropertyAccessExpression(
67474
67449
  location,
67475
67450
  /*checkMode*/
@@ -67477,7 +67452,7 @@ function createTypeChecker(host) {
67477
67452
  /*writeOnly*/
67478
67453
  true
67479
67454
  ) : getTypeOfExpression(location)
67480
- ));
67455
+ );
67481
67456
  if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) {
67482
67457
  return type;
67483
67458
  }
@@ -69525,7 +69500,7 @@ function createTypeChecker(host) {
69525
69500
  let literalType = type.literalType;
69526
69501
  if (!literalType) {
69527
69502
  literalType = type.literalType = cloneTypeReference(type);
69528
- literalType.objectFlags |= 32768 /* ArrayLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
69503
+ literalType.objectFlags |= 16384 /* ArrayLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;
69529
69504
  }
69530
69505
  return literalType;
69531
69506
  }
@@ -69653,7 +69628,7 @@ function createTypeChecker(host) {
69653
69628
  checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl);
69654
69629
  }
69655
69630
  }
69656
- objectFlags |= getObjectFlags(type) & 917504 /* PropagatingFlags */;
69631
+ objectFlags |= getObjectFlags(type) & 458752 /* PropagatingFlags */;
69657
69632
  const nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : void 0;
69658
69633
  const prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : createSymbol(4 /* Property */ | member.flags, member.escapedName, checkFlags);
69659
69634
  if (nameType) {
@@ -69664,7 +69639,7 @@ function createTypeChecker(host) {
69664
69639
  if (isOptional) {
69665
69640
  prop.flags |= 16777216 /* Optional */;
69666
69641
  }
69667
- } else if (contextualTypeHasPattern && !(getObjectFlags(contextualType) & 1024 /* ObjectLiteralPatternWithComputedProperties */)) {
69642
+ } else if (contextualTypeHasPattern && !(getObjectFlags(contextualType) & 512 /* ObjectLiteralPatternWithComputedProperties */)) {
69668
69643
  const impliedProp = getPropertyOfType(contextualType, member.escapedName);
69669
69644
  if (impliedProp) {
69670
69645
  prop.flags |= impliedProp.flags & 16777216 /* Optional */;
@@ -69776,12 +69751,12 @@ function createTypeChecker(host) {
69776
69751
  if (hasComputedSymbolProperty)
69777
69752
  indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, esSymbolType));
69778
69753
  const result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, indexInfos);
69779
- result.objectFlags |= objectFlags | 256 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
69754
+ result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;
69780
69755
  if (isJSObjectLiteral) {
69781
- result.objectFlags |= 8192 /* JSLiteral */;
69756
+ result.objectFlags |= 4096 /* JSLiteral */;
69782
69757
  }
69783
69758
  if (patternWithComputedProperties) {
69784
- result.objectFlags |= 1024 /* ObjectLiteralPatternWithComputedProperties */;
69759
+ result.objectFlags |= 512 /* ObjectLiteralPatternWithComputedProperties */;
69785
69760
  }
69786
69761
  if (inDestructuringPattern) {
69787
69762
  result.pattern = node;
@@ -69843,13 +69818,13 @@ function createTypeChecker(host) {
69843
69818
  let hasSpreadAnyType = false;
69844
69819
  let typeToIntersect;
69845
69820
  let explicitlySpecifyChildrenAttribute = false;
69846
- let objectFlags = 4096 /* JsxAttributes */;
69821
+ let objectFlags = 2048 /* JsxAttributes */;
69847
69822
  const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(openingLikeElement));
69848
69823
  for (const attributeDecl of attributes.properties) {
69849
69824
  const member = attributeDecl.symbol;
69850
69825
  if (isJsxAttribute(attributeDecl)) {
69851
69826
  const exprType = checkJsxAttribute(attributeDecl, checkMode);
69852
- objectFlags |= getObjectFlags(exprType) & 917504 /* PropagatingFlags */;
69827
+ objectFlags |= getObjectFlags(exprType) & 458752 /* PropagatingFlags */;
69853
69828
  const attributeSymbol = createSymbol(4 /* Property */ | member.flags, member.escapedName);
69854
69829
  attributeSymbol.declarations = member.declarations;
69855
69830
  attributeSymbol.parent = member.parent;
@@ -69970,7 +69945,7 @@ function createTypeChecker(host) {
69970
69945
  function createJsxAttributesType() {
69971
69946
  objectFlags |= freshObjectLiteralFlag;
69972
69947
  const result = createAnonymousType(attributes.symbol, attributesTable, emptyArray, emptyArray, emptyArray);
69973
- result.objectFlags |= objectFlags | 256 /* ObjectLiteral */ | 262144 /* ContainsObjectOrArrayLiteral */;
69948
+ result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */;
69974
69949
  return result;
69975
69950
  }
69976
69951
  }
@@ -70363,7 +70338,7 @@ function createTypeChecker(host) {
70363
70338
  return false;
70364
70339
  }
70365
70340
  function isExcessPropertyCheckTarget(type) {
70366
- return !!(type.flags & 524288 /* Object */ && !(getObjectFlags(type) & 1024 /* ObjectLiteralPatternWithComputedProperties */) || type.flags & 67108864 /* NonPrimitive */ || type.flags & 1048576 /* Union */ && some(type.types, isExcessPropertyCheckTarget) || type.flags & 2097152 /* Intersection */ && every(type.types, isExcessPropertyCheckTarget));
70341
+ return !!(type.flags & 524288 /* Object */ && !(getObjectFlags(type) & 512 /* ObjectLiteralPatternWithComputedProperties */) || type.flags & 67108864 /* NonPrimitive */ || type.flags & 1048576 /* Union */ && some(type.types, isExcessPropertyCheckTarget) || type.flags & 2097152 /* Intersection */ && every(type.types, isExcessPropertyCheckTarget));
70367
70342
  }
70368
70343
  function checkJsxExpression(node, checkMode) {
70369
70344
  checkGrammarJsxExpression(node);
@@ -73131,7 +73106,7 @@ function createTypeChecker(host) {
73131
73106
  );
73132
73107
  if ((_c = jsSymbol == null ? void 0 : jsSymbol.exports) == null ? void 0 : _c.size) {
73133
73108
  const jsAssignmentType = createAnonymousType(jsSymbol, jsSymbol.exports, emptyArray, emptyArray, emptyArray);
73134
- jsAssignmentType.objectFlags |= 8192 /* JSLiteral */;
73109
+ jsAssignmentType.objectFlags |= 4096 /* JSLiteral */;
73135
73110
  return getIntersectionType([returnType, jsAssignmentType]);
73136
73111
  }
73137
73112
  }
@@ -73477,7 +73452,7 @@ function createTypeChecker(host) {
73477
73452
  hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
73478
73453
  if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
73479
73454
  const result3 = createAnonymousType(createSymbol(0 /* None */, "__instantiationExpression" /* InstantiationExpression */), resolved.members, callSignatures, constructSignatures, resolved.indexInfos);
73480
- result3.objectFlags |= 16777216 /* InstantiationExpressionType */;
73455
+ result3.objectFlags |= 8388608 /* InstantiationExpressionType */;
73481
73456
  result3.node = node;
73482
73457
  return result3;
73483
73458
  }
@@ -74518,7 +74493,7 @@ function createTypeChecker(host) {
74518
74493
  64 /* IsNonInferrable */
74519
74494
  );
74520
74495
  const returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], emptyArray, emptyArray);
74521
- returnOnlyType.objectFlags |= 524288 /* NonInferrableType */;
74496
+ returnOnlyType.objectFlags |= 262144 /* NonInferrableType */;
74522
74497
  return links.contextFreeType = returnOnlyType;
74523
74498
  }
74524
74499
  }
@@ -85294,7 +85269,7 @@ function createTypeChecker(host) {
85294
85269
  }
85295
85270
  }
85296
85271
  function findBestTypeForObjectLiteral(source, unionTarget) {
85297
- if (getObjectFlags(source) & 256 /* ObjectLiteral */ && someType(unionTarget, isArrayLikeType)) {
85272
+ if (getObjectFlags(source) & 128 /* ObjectLiteral */ && someType(unionTarget, isArrayLikeType)) {
85298
85273
  return find(unionTarget.types, (t) => !isArrayLikeType(t));
85299
85274
  }
85300
85275
  }