@typescript-deploys/pr-build 5.1.0-pr-53134-21 → 5.1.0-pr-53098-13

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.
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.1";
38
- version = `${versionMajorMinor}.0-insiders.20230308`;
38
+ version = `${versionMajorMinor}.0-insiders.20230310`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -3545,7 +3545,7 @@ ${lanes.join("\n")}
3545
3545
  const name = DiagnosticCategory[d.category];
3546
3546
  return lowerCase ? name.toLowerCase() : name;
3547
3547
  }
3548
- var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
3548
+ var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas;
3549
3549
  var init_types = __esm({
3550
3550
  "src/compiler/types.ts"() {
3551
3551
  "use strict";
@@ -4556,6 +4556,13 @@ ${lanes.join("\n")}
4556
4556
  AccessFlags2[AccessFlags2["Persistent"] = 1 /* IncludeUndefined */] = "Persistent";
4557
4557
  return AccessFlags2;
4558
4558
  })(AccessFlags || {});
4559
+ IndexFlags = /* @__PURE__ */ ((IndexFlags2) => {
4560
+ IndexFlags2[IndexFlags2["None"] = 0] = "None";
4561
+ IndexFlags2[IndexFlags2["StringsOnly"] = 1] = "StringsOnly";
4562
+ IndexFlags2[IndexFlags2["NoIndexSignatures"] = 2] = "NoIndexSignatures";
4563
+ IndexFlags2[IndexFlags2["NoReducibleCheck"] = 4] = "NoReducibleCheck";
4564
+ return IndexFlags2;
4565
+ })(IndexFlags || {});
4559
4566
  JsxReferenceKind = /* @__PURE__ */ ((JsxReferenceKind2) => {
4560
4567
  JsxReferenceKind2[JsxReferenceKind2["Component"] = 0] = "Component";
4561
4568
  JsxReferenceKind2[JsxReferenceKind2["Function"] = 1] = "Function";
@@ -6098,20 +6105,6 @@ ${lanes.join("\n")}
6098
6105
  (path2) => sys2.directoryExists(path2)
6099
6106
  );
6100
6107
  }
6101
- function getNodeMajorVersion() {
6102
- if (typeof process === "undefined") {
6103
- return void 0;
6104
- }
6105
- const version2 = process.version;
6106
- if (!version2) {
6107
- return void 0;
6108
- }
6109
- const dot = version2.indexOf(".");
6110
- if (dot === -1) {
6111
- return void 0;
6112
- }
6113
- return parseInt(version2.substring(1, dot));
6114
- }
6115
6108
  function setSys(s) {
6116
6109
  sys = s;
6117
6110
  }
@@ -6159,14 +6152,12 @@ ${lanes.join("\n")}
6159
6152
  let activeSession;
6160
6153
  let profilePath = "./profile.cpuprofile";
6161
6154
  const Buffer2 = require("buffer").Buffer;
6162
- const nodeVersion = getNodeMajorVersion();
6163
- const isNode4OrLater = nodeVersion >= 4;
6164
6155
  const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
6165
6156
  const platform = _os.platform();
6166
6157
  const useCaseSensitiveFileNames = isFileSystemCaseSensitive();
6167
6158
  const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync;
6168
6159
  const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename;
6169
- const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
6160
+ const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin";
6170
6161
  const getCurrentDirectory = memoize(() => process.cwd());
6171
6162
  const { watchFile: watchFile2, watchDirectory } = createSystemWatchFunctions({
6172
6163
  pollingWatchFileWorker: fsWatchFileWorker,
@@ -45092,6 +45083,7 @@ ${lanes.join("\n")}
45092
45083
  var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
45093
45084
  var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
45094
45085
  var keyofStringsOnly = !!compilerOptions.keyofStringsOnly;
45086
+ var defaultIndexFlags = keyofStringsOnly ? 1 /* StringsOnly */ : 0 /* None */;
45095
45087
  var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 8192 /* FreshLiteral */;
45096
45088
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
45097
45089
  var checkBinaryExpression = createCheckBinaryExpression();
@@ -55080,10 +55072,9 @@ ${lanes.join("\n")}
55080
55072
  return [sig.parameters];
55081
55073
  function expandSignatureParametersWithTupleMembers(restType, restIndex) {
55082
55074
  const elementTypes = getTypeArguments(restType);
55083
- const associatedNames = restType.target.labeledElementDeclarations;
55075
+ const associatedNames = getUniqAssociatedNamesFromTupleType(restType);
55084
55076
  const restParams = map(elementTypes, (t, i) => {
55085
- const tupleLabelName = !!associatedNames && getTupleElementLabel(associatedNames[i]);
55086
- const name = tupleLabelName || getParameterNameAtPosition(sig, restIndex + i, restType);
55077
+ const name = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType);
55087
55078
  const flags = restType.target.elementFlags[i];
55088
55079
  const checkFlags = flags & 12 /* Variable */ ? 32768 /* RestParameter */ : flags & 2 /* Optional */ ? 16384 /* OptionalParameter */ : 0;
55089
55080
  const symbol = createSymbol(1 /* FunctionScopedVariable */, name, checkFlags);
@@ -55092,6 +55083,20 @@ ${lanes.join("\n")}
55092
55083
  });
55093
55084
  return concatenate(sig.parameters.slice(0, restIndex), restParams);
55094
55085
  }
55086
+ function getUniqAssociatedNamesFromTupleType(type) {
55087
+ const associatedNamesMap = /* @__PURE__ */ new Map();
55088
+ return map(type.target.labeledElementDeclarations, (labeledElement) => {
55089
+ const name = getTupleElementLabel(labeledElement);
55090
+ const prevCounter = associatedNamesMap.get(name);
55091
+ if (prevCounter === void 0) {
55092
+ associatedNamesMap.set(name, 1);
55093
+ return name;
55094
+ } else {
55095
+ associatedNamesMap.set(name, prevCounter + 1);
55096
+ return `${name}_${prevCounter}`;
55097
+ }
55098
+ });
55099
+ }
55095
55100
  }
55096
55101
  function getDefaultConstructSignatures(classType) {
55097
55102
  const baseConstructorType = getBaseConstructorTypeOfClass(classType);
@@ -56347,6 +56352,13 @@ ${lanes.join("\n")}
56347
56352
  function isConflictingPrivateProperty(prop) {
56348
56353
  return !prop.valueDeclaration && !!(getCheckFlags(prop) & 1024 /* ContainsPrivate */);
56349
56354
  }
56355
+ function isGenericReducibleType(type) {
56356
+ return !!(type.flags & 1048576 /* Union */ && type.objectFlags & 16777216 /* ContainsIntersections */ && some(type.types, isGenericReducibleType) || type.flags & 2097152 /* Intersection */ && isReducibleIntersection(type));
56357
+ }
56358
+ function isReducibleIntersection(type) {
56359
+ const uniqueFilled = type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper));
56360
+ return getReducedType(uniqueFilled) !== uniqueFilled;
56361
+ }
56350
56362
  function elaborateNeverIntersection(errorInfo, type) {
56351
56363
  if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 33554432 /* IsNeverIntersection */) {
56352
56364
  const neverProp = find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType);
@@ -57789,7 +57801,7 @@ ${lanes.join("\n")}
57789
57801
  }
57790
57802
  function getGlobalOmitSymbol() {
57791
57803
  deferredGlobalOmitSymbol || (deferredGlobalOmitSymbol = getGlobalTypeAliasSymbol(
57792
- "MappedOmit",
57804
+ "Omit",
57793
57805
  /*arity*/
57794
57806
  2,
57795
57807
  /*reportErrors*/
@@ -58716,10 +58728,10 @@ ${lanes.join("\n")}
58716
58728
  }
58717
58729
  return links.resolvedType;
58718
58730
  }
58719
- function createIndexType(type, stringsOnly) {
58731
+ function createIndexType(type, indexFlags) {
58720
58732
  const result = createType(4194304 /* Index */);
58721
58733
  result.type = type;
58722
- result.stringsOnly = stringsOnly;
58734
+ result.indexFlags = indexFlags;
58723
58735
  return result;
58724
58736
  }
58725
58737
  function createOriginIndexType(type) {
@@ -58727,31 +58739,23 @@ ${lanes.join("\n")}
58727
58739
  result.type = type;
58728
58740
  return result;
58729
58741
  }
58730
- function getIndexTypeForGenericType(type, stringsOnly) {
58731
- return stringsOnly ? type.resolvedStringIndexType || (type.resolvedStringIndexType = createIndexType(
58732
- type,
58733
- /*stringsOnly*/
58734
- true
58735
- )) : type.resolvedIndexType || (type.resolvedIndexType = createIndexType(
58736
- type,
58737
- /*stringsOnly*/
58738
- false
58739
- ));
58742
+ function getIndexTypeForGenericType(type, indexFlags) {
58743
+ return indexFlags & 1 /* StringsOnly */ ? type.resolvedStringIndexType || (type.resolvedStringIndexType = createIndexType(type, 1 /* StringsOnly */)) : type.resolvedIndexType || (type.resolvedIndexType = createIndexType(type, 0 /* None */));
58740
58744
  }
58741
- function getIndexTypeForMappedType(type, stringsOnly, noIndexSignatures) {
58745
+ function getIndexTypeForMappedType(type, indexFlags) {
58742
58746
  const typeParameter = getTypeParameterFromMappedType(type);
58743
58747
  const constraintType = getConstraintTypeFromMappedType(type);
58744
58748
  const nameType = getNameTypeFromMappedType(type.target || type);
58745
- if (!nameType && !noIndexSignatures) {
58749
+ if (!nameType && !(indexFlags & 2 /* NoIndexSignatures */)) {
58746
58750
  return constraintType;
58747
58751
  }
58748
58752
  const keyTypes = [];
58749
58753
  if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
58750
58754
  if (!isGenericIndexType(constraintType)) {
58751
58755
  const modifiersType = getApparentType(getModifiersTypeFromMappedType(type));
58752
- forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576 /* StringOrNumberLiteralOrUnique */, stringsOnly, addMemberForKeyType);
58756
+ forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576 /* StringOrNumberLiteralOrUnique */, !!(indexFlags & 1 /* StringsOnly */), addMemberForKeyType);
58753
58757
  } else {
58754
- return getIndexTypeForGenericType(type, stringsOnly);
58758
+ return getIndexTypeForGenericType(type, indexFlags);
58755
58759
  }
58756
58760
  } else {
58757
58761
  forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
@@ -58759,7 +58763,7 @@ ${lanes.join("\n")}
58759
58763
  if (isGenericIndexType(constraintType)) {
58760
58764
  forEachType(constraintType, addMemberForKeyType);
58761
58765
  }
58762
- const result = noIndexSignatures ? filterType(getUnionType(keyTypes), (t) => !(t.flags & (1 /* Any */ | 4 /* String */))) : getUnionType(keyTypes);
58766
+ const result = indexFlags & 2 /* NoIndexSignatures */ ? filterType(getUnionType(keyTypes), (t) => !(t.flags & (1 /* Any */ | 4 /* String */))) : getUnionType(keyTypes);
58763
58767
  if (result.flags & 1048576 /* Union */ && constraintType.flags & 1048576 /* Union */ && getTypeListId(result.types) === getTypeListId(constraintType.types)) {
58764
58768
  return constraintType;
58765
58769
  }
@@ -58812,19 +58816,15 @@ ${lanes.join("\n")}
58812
58816
  origin
58813
58817
  );
58814
58818
  }
58815
- function isPossiblyReducibleByInstantiation(type) {
58816
- const uniqueFilled = getUniqueLiteralFilledInstantiation(type);
58817
- return getReducedType(uniqueFilled) !== uniqueFilled;
58818
- }
58819
- function shouldDeferIndexType(type) {
58820
- return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && !hasDistributiveNameType(type) || type.flags & 1048576 /* Union */ && some(type.types, isPossiblyReducibleByInstantiation) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
58819
+ function shouldDeferIndexType(type, indexFlags = 0 /* None */) {
58820
+ return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && !hasDistributiveNameType(type) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType));
58821
58821
  }
58822
- function getIndexType(type, stringsOnly = keyofStringsOnly, noIndexSignatures) {
58822
+ function getIndexType(type, indexFlags = defaultIndexFlags) {
58823
58823
  type = getReducedType(type);
58824
- return shouldDeferIndexType(type) ? getIndexTypeForGenericType(type, stringsOnly) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, stringsOnly, noIndexSignatures))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, stringsOnly, noIndexSignatures))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, stringsOnly, noIndexSignatures) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(
58824
+ return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(
58825
58825
  type,
58826
- (noIndexSignatures ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (stringsOnly ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */),
58827
- stringsOnly === keyofStringsOnly && !noIndexSignatures
58826
+ (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */),
58827
+ indexFlags === defaultIndexFlags
58828
58828
  );
58829
58829
  }
58830
58830
  function getExtractStringType(type) {
@@ -59364,12 +59364,13 @@ ${lanes.join("\n")}
59364
59364
  if (objectType === wildcardType || indexType === wildcardType) {
59365
59365
  return wildcardType;
59366
59366
  }
59367
+ objectType = getReducedType(objectType);
59367
59368
  if (isStringIndexSignatureOnlyType(objectType) && !(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) {
59368
59369
  indexType = stringType;
59369
59370
  }
59370
59371
  if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */)
59371
59372
  accessFlags |= 1 /* IncludeUndefined */;
59372
- if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 197 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) {
59373
+ if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 197 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)) || isGenericReducibleType(objectType))) {
59373
59374
  if (objectType.flags & 3 /* AnyOrUnknown */) {
59374
59375
  return objectType;
59375
59376
  }
@@ -60555,9 +60556,6 @@ ${lanes.join("\n")}
60555
60556
  }
60556
60557
  return type;
60557
60558
  }
60558
- function getUniqueLiteralFilledInstantiation(type) {
60559
- return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper));
60560
- }
60561
60559
  function getPermissiveInstantiation(type) {
60562
60560
  return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper));
60563
60561
  }
@@ -62752,7 +62750,7 @@ ${lanes.join("\n")}
62752
62750
  } else {
62753
62751
  const constraint = getSimplifiedTypeOrConstraint(targetType);
62754
62752
  if (constraint) {
62755
- if (isRelatedTo(source2, getIndexType(constraint, target2.stringsOnly), 2 /* Target */, reportErrors2) === -1 /* True */) {
62753
+ if (isRelatedTo(source2, getIndexType(constraint, target2.indexFlags | 4 /* NoReducibleCheck */), 2 /* Target */, reportErrors2) === -1 /* True */) {
62756
62754
  return -1 /* True */;
62757
62755
  }
62758
62756
  } else if (isGenericMappedType(targetType)) {
@@ -62833,13 +62831,7 @@ ${lanes.join("\n")}
62833
62831
  }
62834
62832
  if (!isGenericMappedType(source2)) {
62835
62833
  const targetKeys = keysRemapped ? getNameTypeFromMappedType(target2) : getConstraintTypeFromMappedType(target2);
62836
- const sourceKeys = getIndexType(
62837
- source2,
62838
- /*stringsOnly*/
62839
- void 0,
62840
- /*noIndexSignatures*/
62841
- true
62842
- );
62834
+ const sourceKeys = getIndexType(source2, 2 /* NoIndexSignatures */);
62843
62835
  const includeOptional = modifiers & 4 /* IncludeOptional */;
62844
62836
  const filteredByApplicability = includeOptional ? intersectTypes(targetKeys, sourceKeys) : void 0;
62845
62837
  if (includeOptional ? !(filteredByApplicability.flags & 131072 /* Never */) : isRelatedTo(targetKeys, sourceKeys, 3 /* Both */)) {
@@ -69671,13 +69663,14 @@ ${lanes.join("\n")}
69671
69663
  const elementFlags = [];
69672
69664
  pushCachedContextualType(node);
69673
69665
  const inDestructuringPattern = isAssignmentTarget(node);
69674
- const inConstContext = isConstContext(node);
69666
+ const isSpreadIntoCallOrNew = isSpreadElement(node.parent) && isCallOrNewExpression(node.parent.parent);
69667
+ const inConstContext = isSpreadIntoCallOrNew || isConstContext(node);
69675
69668
  const contextualType = getApparentTypeOfContextualType(
69676
69669
  node,
69677
69670
  /*contextFlags*/
69678
69671
  void 0
69679
69672
  );
69680
- const inTupleContext = !!contextualType && someType(contextualType, isTupleLikeType);
69673
+ const inTupleContext = isSpreadIntoCallOrNew || !!contextualType && someType(contextualType, isTupleLikeType);
69681
69674
  let hasOmittedExpression = false;
69682
69675
  for (let i = 0; i < elementCount; i++) {
69683
69676
  const e = elements[i];
@@ -77071,11 +77064,7 @@ ${lanes.join("\n")}
77071
77064
  }
77072
77065
  const objectType = type.objectType;
77073
77066
  const indexType = type.indexType;
77074
- if (isTypeAssignableTo(indexType, getIndexType(
77075
- objectType,
77076
- /*stringsOnly*/
77077
- false
77078
- ))) {
77067
+ if (isTypeAssignableTo(indexType, getIndexType(objectType, 0 /* None */))) {
77079
77068
  if (accessNode.kind === 210 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) {
77080
77069
  error(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
77081
77070
  }
@@ -142575,9 +142564,10 @@ ${lanes.join("\n")}
142575
142564
  if (!isMemberName(token))
142576
142565
  return void 0;
142577
142566
  if (isIdentifier(token) && hasInitializer(parent2) && parent2.initializer && isObjectLiteralExpression(parent2.initializer)) {
142567
+ const targetType = checker.getContextualType(token) || checker.getTypeAtLocation(token);
142578
142568
  const properties = arrayFrom(checker.getUnmatchedProperties(
142579
142569
  checker.getTypeAtLocation(parent2.initializer),
142580
- checker.getTypeAtLocation(token),
142570
+ targetType,
142581
142571
  /* requireOptionalProperties */
142582
142572
  false,
142583
142573
  /* matchDiscriminantProperties */
@@ -178683,6 +178673,7 @@ ${e.message}`;
178683
178673
  ImportKind: () => ImportKind,
178684
178674
  ImportsNotUsedAsValues: () => ImportsNotUsedAsValues,
178685
178675
  IndentStyle: () => IndentStyle,
178676
+ IndexFlags: () => IndexFlags,
178686
178677
  IndexKind: () => IndexKind,
178687
178678
  InferenceFlags: () => InferenceFlags,
178688
178679
  InferencePriority: () => InferencePriority,
@@ -179475,7 +179466,6 @@ ${e.message}`;
179475
179466
  getNodeForGeneratedName: () => getNodeForGeneratedName,
179476
179467
  getNodeId: () => getNodeId,
179477
179468
  getNodeKind: () => getNodeKind,
179478
- getNodeMajorVersion: () => getNodeMajorVersion,
179479
179469
  getNodeModifiers: () => getNodeModifiers,
179480
179470
  getNodeModulePathParts: () => getNodeModulePathParts,
179481
179471
  getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,
@@ -181040,6 +181030,7 @@ ${e.message}`;
181040
181030
  ImportKind: () => ImportKind,
181041
181031
  ImportsNotUsedAsValues: () => ImportsNotUsedAsValues,
181042
181032
  IndentStyle: () => IndentStyle,
181033
+ IndexFlags: () => IndexFlags,
181043
181034
  IndexKind: () => IndexKind,
181044
181035
  InferenceFlags: () => InferenceFlags,
181045
181036
  InferencePriority: () => InferencePriority,
@@ -181832,7 +181823,6 @@ ${e.message}`;
181832
181823
  getNodeForGeneratedName: () => getNodeForGeneratedName,
181833
181824
  getNodeId: () => getNodeId,
181834
181825
  getNodeKind: () => getNodeKind,
181835
- getNodeMajorVersion: () => getNodeMajorVersion,
181836
181826
  getNodeModifiers: () => getNodeModifiers,
181837
181827
  getNodeModulePathParts: () => getNodeModulePathParts,
181838
181828
  getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration,
@@ -4342,7 +4342,6 @@ declare namespace ts {
4342
4342
  negative: boolean;
4343
4343
  base10Value: string;
4344
4344
  }
4345
- function getNodeMajorVersion(): number | undefined;
4346
4345
  enum FileWatcherEventKind {
4347
4346
  Created = 0,
4348
4347
  Changed = 1,