@typescript-deploys/pr-build 5.2.0-pr-49218-24 → 5.2.0-pr-54891-7

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
@@ -6118,6 +6118,7 @@ var Diagnostics = {
6118
6118
  The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),
6119
6119
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
6120
6120
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
6121
+ Unexpected_token_Did_you_mean_0: diag(1496, 1 /* Error */, "Unexpected_token_Did_you_mean_0_1496", "Unexpected token. Did you mean '{0}'?"),
6121
6122
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
6122
6123
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
6123
6124
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -9155,6 +9156,10 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9155
9156
  case 33 /* exclamation */:
9156
9157
  if (text.charCodeAt(pos + 1) === 61 /* equals */) {
9157
9158
  if (text.charCodeAt(pos + 2) === 61 /* equals */) {
9159
+ if (text.charCodeAt(pos + 3) === 61 /* equals */) {
9160
+ error(Diagnostics.Unexpected_token_Did_you_mean_0, pos, 4, "!==");
9161
+ return pos += 4, token = 38 /* ExclamationEqualsEqualsToken */;
9162
+ }
9158
9163
  return pos += 3, token = 38 /* ExclamationEqualsEqualsToken */;
9159
9164
  }
9160
9165
  return pos += 2, token = 36 /* ExclamationEqualsToken */;
@@ -59467,37 +59472,7 @@ function createTypeChecker(host) {
59467
59472
  const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
59468
59473
  for (let i = 0; i < paramCount; i++) {
59469
59474
  const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
59470
- let targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
59471
- if (i === restIndex && targetType && sourceType && isTupleType(sourceType)) {
59472
- targetType = mapType(targetType, (t) => {
59473
- if (!isTupleType(t) || // When both sides are tuples of the same structure, we don't want to "propagate" types from elements of variable positions
59474
- // to the following positions as that would disallow signatures of the exact same structures when trailing fixed elements are involved:
59475
- //
59476
- // let fn: (...rest: [...string[], number]) => void = (...rest: [...string[], number]) => {}; // ok
59477
- //
59478
- // Since we want to allow contextual types to flow into paremeters, we don't need to differentiate between rest and variadic elements
59479
- // as that doesn't affect the contextual type of the parameter
59480
- isTupleTypeStructureMatching(sourceType, t, 2 /* MatchVariable */)) {
59481
- return t;
59482
- }
59483
- const elementTypes = [];
59484
- const elementFlags = [];
59485
- const sourceArity = getTypeReferenceArity(sourceType);
59486
- const targetArity = getTypeReferenceArity(t);
59487
- for (let i2 = 0; i2 < sourceArity; i2++) {
59488
- if (i2 >= targetArity) {
59489
- if (sourceType.target.elementFlags[i2] & 3 /* Fixed */) {
59490
- elementTypes.push(undefinedType);
59491
- elementFlags.push(sourceType.target.elementFlags[i2]);
59492
- }
59493
- continue;
59494
- }
59495
- elementTypes.push(getTupleElementType(t, i2));
59496
- elementFlags.push(sourceType.target.elementFlags[i2]);
59497
- }
59498
- return createTupleType(elementTypes, elementFlags);
59499
- });
59500
- }
59475
+ const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
59501
59476
  if (sourceType && targetType) {
59502
59477
  const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
59503
59478
  const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
@@ -62680,11 +62655,8 @@ function createTypeChecker(host) {
62680
62655
  }
62681
62656
  return void 0;
62682
62657
  }
62683
- function isTupleTypeStructureMatching(t1, t2, tupleStructureComparisonKind) {
62684
- return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f1, i) => {
62685
- const f2 = t2.target.elementFlags[i];
62686
- return f1 === f2 || !!(tupleStructureComparisonKind & 1 /* MatchFixed */ && f1 & 3 /* Fixed */ && f2 & 3 /* Fixed */) || !!(tupleStructureComparisonKind & 2 /* MatchVariable */ && f1 & 12 /* Variable */ && f2 & 12 /* Variable */);
62687
- });
62658
+ function isTupleTypeStructureMatching(t1, t2) {
62659
+ return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f, i) => (f & 12 /* Variable */) === (t2.target.elementFlags[i] & 12 /* Variable */));
62688
62660
  }
62689
62661
  function isZeroBigInt({ value }) {
62690
62662
  return value.base10Value === "0";
@@ -63880,7 +63852,7 @@ function createTypeChecker(host) {
63880
63852
  const targetArity = getTypeReferenceArity(target);
63881
63853
  const elementTypes = getTypeArguments(target);
63882
63854
  const elementFlags = target.target.elementFlags;
63883
- if (isTupleType(source) && isTupleTypeStructureMatching(source, target, 1 /* MatchFixed */)) {
63855
+ if (isTupleType(source) && isTupleTypeStructureMatching(source, target)) {
63884
63856
  for (let i = 0; i < targetArity; i++) {
63885
63857
  inferFromTypes(getTypeArguments(source)[i], elementTypes[i]);
63886
63858
  }
@@ -118453,6 +118425,9 @@ function parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host
118453
118425
  return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
118454
118426
  },
118455
118427
  readFile: (f) => directoryStructureHost.readFile(f),
118428
+ directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
118429
+ getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
118430
+ realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
118456
118431
  useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
118457
118432
  getCurrentDirectory: () => host.getCurrentDirectory(),
118458
118433
  onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
package/lib/tsserver.js CHANGED
@@ -9639,6 +9639,7 @@ var Diagnostics = {
9639
9639
  The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),
9640
9640
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
9641
9641
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
9642
+ Unexpected_token_Did_you_mean_0: diag(1496, 1 /* Error */, "Unexpected_token_Did_you_mean_0_1496", "Unexpected token. Did you mean '{0}'?"),
9642
9643
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
9643
9644
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
9644
9645
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -12697,6 +12698,10 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12697
12698
  case 33 /* exclamation */:
12698
12699
  if (text.charCodeAt(pos + 1) === 61 /* equals */) {
12699
12700
  if (text.charCodeAt(pos + 2) === 61 /* equals */) {
12701
+ if (text.charCodeAt(pos + 3) === 61 /* equals */) {
12702
+ error2(Diagnostics.Unexpected_token_Did_you_mean_0, pos, 4, "!==");
12703
+ return pos += 4, token = 38 /* ExclamationEqualsEqualsToken */;
12704
+ }
12700
12705
  return pos += 3, token = 38 /* ExclamationEqualsEqualsToken */;
12701
12706
  }
12702
12707
  return pos += 2, token = 36 /* ExclamationEqualsToken */;
@@ -64174,37 +64179,7 @@ function createTypeChecker(host) {
64174
64179
  const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
64175
64180
  for (let i = 0; i < paramCount; i++) {
64176
64181
  const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
64177
- let targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
64178
- if (i === restIndex && targetType && sourceType && isTupleType(sourceType)) {
64179
- targetType = mapType(targetType, (t) => {
64180
- if (!isTupleType(t) || // When both sides are tuples of the same structure, we don't want to "propagate" types from elements of variable positions
64181
- // to the following positions as that would disallow signatures of the exact same structures when trailing fixed elements are involved:
64182
- //
64183
- // let fn: (...rest: [...string[], number]) => void = (...rest: [...string[], number]) => {}; // ok
64184
- //
64185
- // Since we want to allow contextual types to flow into paremeters, we don't need to differentiate between rest and variadic elements
64186
- // as that doesn't affect the contextual type of the parameter
64187
- isTupleTypeStructureMatching(sourceType, t, 2 /* MatchVariable */)) {
64188
- return t;
64189
- }
64190
- const elementTypes = [];
64191
- const elementFlags = [];
64192
- const sourceArity = getTypeReferenceArity(sourceType);
64193
- const targetArity = getTypeReferenceArity(t);
64194
- for (let i2 = 0; i2 < sourceArity; i2++) {
64195
- if (i2 >= targetArity) {
64196
- if (sourceType.target.elementFlags[i2] & 3 /* Fixed */) {
64197
- elementTypes.push(undefinedType);
64198
- elementFlags.push(sourceType.target.elementFlags[i2]);
64199
- }
64200
- continue;
64201
- }
64202
- elementTypes.push(getTupleElementType(t, i2));
64203
- elementFlags.push(sourceType.target.elementFlags[i2]);
64204
- }
64205
- return createTupleType(elementTypes, elementFlags);
64206
- });
64207
- }
64182
+ const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
64208
64183
  if (sourceType && targetType) {
64209
64184
  const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
64210
64185
  const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
@@ -67387,11 +67362,8 @@ function createTypeChecker(host) {
67387
67362
  }
67388
67363
  return void 0;
67389
67364
  }
67390
- function isTupleTypeStructureMatching(t1, t2, tupleStructureComparisonKind) {
67391
- return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f1, i) => {
67392
- const f2 = t2.target.elementFlags[i];
67393
- return f1 === f2 || !!(tupleStructureComparisonKind & 1 /* MatchFixed */ && f1 & 3 /* Fixed */ && f2 & 3 /* Fixed */) || !!(tupleStructureComparisonKind & 2 /* MatchVariable */ && f1 & 12 /* Variable */ && f2 & 12 /* Variable */);
67394
- });
67365
+ function isTupleTypeStructureMatching(t1, t2) {
67366
+ return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f, i) => (f & 12 /* Variable */) === (t2.target.elementFlags[i] & 12 /* Variable */));
67395
67367
  }
67396
67368
  function isZeroBigInt({ value }) {
67397
67369
  return value.base10Value === "0";
@@ -68587,7 +68559,7 @@ function createTypeChecker(host) {
68587
68559
  const targetArity = getTypeReferenceArity(target);
68588
68560
  const elementTypes = getTypeArguments(target);
68589
68561
  const elementFlags = target.target.elementFlags;
68590
- if (isTupleType(source) && isTupleTypeStructureMatching(source, target, 1 /* MatchFixed */)) {
68562
+ if (isTupleType(source) && isTupleTypeStructureMatching(source, target)) {
68591
68563
  for (let i = 0; i < targetArity; i++) {
68592
68564
  inferFromTypes(getTypeArguments(source)[i], elementTypes[i]);
68593
68565
  }
@@ -123396,6 +123368,9 @@ function parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host
123396
123368
  return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
123397
123369
  },
123398
123370
  readFile: (f) => directoryStructureHost.readFile(f),
123371
+ directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
123372
+ getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
123373
+ realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
123399
123374
  useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
123400
123375
  getCurrentDirectory: () => host.getCurrentDirectory(),
123401
123376
  onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
@@ -143778,6 +143753,9 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
143778
143753
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
143779
143754
  fileExists: (fileName) => compilerHost.fileExists(fileName),
143780
143755
  readFile: (fileName) => compilerHost.readFile(fileName),
143756
+ directoryExists: (f) => compilerHost.directoryExists(f),
143757
+ getDirectories: (f) => compilerHost.getDirectories(f),
143758
+ realpath: compilerHost.realpath,
143781
143759
  readDirectory: (...args) => compilerHost.readDirectory(...args),
143782
143760
  trace: compilerHost.trace,
143783
143761
  getCurrentDirectory: compilerHost.getCurrentDirectory,
@@ -6274,7 +6274,7 @@ declare namespace ts {
6274
6274
  getSourceFileByPath(path: Path): SourceFile | undefined;
6275
6275
  getCurrentDirectory(): string;
6276
6276
  }
6277
- interface ParseConfigHost {
6277
+ interface ParseConfigHost extends ModuleResolutionHost {
6278
6278
  useCaseSensitiveFileNames: boolean;
6279
6279
  readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
6280
6280
  /**
@@ -7422,6 +7422,7 @@ ${lanes.join("\n")}
7422
7422
  The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),
7423
7423
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
7424
7424
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
7425
+ Unexpected_token_Did_you_mean_0: diag(1496, 1 /* Error */, "Unexpected_token_Did_you_mean_0_1496", "Unexpected token. Did you mean '{0}'?"),
7425
7426
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
7426
7427
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
7427
7428
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -10321,6 +10322,10 @@ ${lanes.join("\n")}
10321
10322
  case 33 /* exclamation */:
10322
10323
  if (text.charCodeAt(pos + 1) === 61 /* equals */) {
10323
10324
  if (text.charCodeAt(pos + 2) === 61 /* equals */) {
10325
+ if (text.charCodeAt(pos + 3) === 61 /* equals */) {
10326
+ error2(Diagnostics.Unexpected_token_Did_you_mean_0, pos, 4, "!==");
10327
+ return pos += 4, token = 38 /* ExclamationEqualsEqualsToken */;
10328
+ }
10324
10329
  return pos += 3, token = 38 /* ExclamationEqualsEqualsToken */;
10325
10330
  }
10326
10331
  return pos += 2, token = 36 /* ExclamationEqualsToken */;
@@ -61941,37 +61946,7 @@ ${lanes.join("\n")}
61941
61946
  const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
61942
61947
  for (let i = 0; i < paramCount; i++) {
61943
61948
  const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
61944
- let targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
61945
- if (i === restIndex && targetType && sourceType && isTupleType(sourceType)) {
61946
- targetType = mapType(targetType, (t) => {
61947
- if (!isTupleType(t) || // When both sides are tuples of the same structure, we don't want to "propagate" types from elements of variable positions
61948
- // to the following positions as that would disallow signatures of the exact same structures when trailing fixed elements are involved:
61949
- //
61950
- // let fn: (...rest: [...string[], number]) => void = (...rest: [...string[], number]) => {}; // ok
61951
- //
61952
- // Since we want to allow contextual types to flow into paremeters, we don't need to differentiate between rest and variadic elements
61953
- // as that doesn't affect the contextual type of the parameter
61954
- isTupleTypeStructureMatching(sourceType, t, 2 /* MatchVariable */)) {
61955
- return t;
61956
- }
61957
- const elementTypes = [];
61958
- const elementFlags = [];
61959
- const sourceArity = getTypeReferenceArity(sourceType);
61960
- const targetArity = getTypeReferenceArity(t);
61961
- for (let i2 = 0; i2 < sourceArity; i2++) {
61962
- if (i2 >= targetArity) {
61963
- if (sourceType.target.elementFlags[i2] & 3 /* Fixed */) {
61964
- elementTypes.push(undefinedType);
61965
- elementFlags.push(sourceType.target.elementFlags[i2]);
61966
- }
61967
- continue;
61968
- }
61969
- elementTypes.push(getTupleElementType(t, i2));
61970
- elementFlags.push(sourceType.target.elementFlags[i2]);
61971
- }
61972
- return createTupleType(elementTypes, elementFlags);
61973
- });
61974
- }
61949
+ const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
61975
61950
  if (sourceType && targetType) {
61976
61951
  const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
61977
61952
  const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
@@ -65154,11 +65129,8 @@ ${lanes.join("\n")}
65154
65129
  }
65155
65130
  return void 0;
65156
65131
  }
65157
- function isTupleTypeStructureMatching(t1, t2, tupleStructureComparisonKind) {
65158
- return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f1, i) => {
65159
- const f2 = t2.target.elementFlags[i];
65160
- return f1 === f2 || !!(tupleStructureComparisonKind & 1 /* MatchFixed */ && f1 & 3 /* Fixed */ && f2 & 3 /* Fixed */) || !!(tupleStructureComparisonKind & 2 /* MatchVariable */ && f1 & 12 /* Variable */ && f2 & 12 /* Variable */);
65161
- });
65132
+ function isTupleTypeStructureMatching(t1, t2) {
65133
+ return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f, i) => (f & 12 /* Variable */) === (t2.target.elementFlags[i] & 12 /* Variable */));
65162
65134
  }
65163
65135
  function isZeroBigInt({ value }) {
65164
65136
  return value.base10Value === "0";
@@ -66354,7 +66326,7 @@ ${lanes.join("\n")}
66354
66326
  const targetArity = getTypeReferenceArity(target);
66355
66327
  const elementTypes = getTypeArguments(target);
66356
66328
  const elementFlags = target.target.elementFlags;
66357
- if (isTupleType(source) && isTupleTypeStructureMatching(source, target, 1 /* MatchFixed */)) {
66329
+ if (isTupleType(source) && isTupleTypeStructureMatching(source, target)) {
66358
66330
  for (let i = 0; i < targetArity; i++) {
66359
66331
  inferFromTypes(getTypeArguments(source)[i], elementTypes[i]);
66360
66332
  }
@@ -121381,6 +121353,9 @@ ${lanes.join("\n")}
121381
121353
  return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
121382
121354
  },
121383
121355
  readFile: (f) => directoryStructureHost.readFile(f),
121356
+ directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
121357
+ getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
121358
+ realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
121384
121359
  useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
121385
121360
  getCurrentDirectory: () => host.getCurrentDirectory(),
121386
121361
  onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
@@ -141723,6 +141698,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
141723
141698
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
141724
141699
  fileExists: (fileName) => compilerHost.fileExists(fileName),
141725
141700
  readFile: (fileName) => compilerHost.readFile(fileName),
141701
+ directoryExists: (f) => compilerHost.directoryExists(f),
141702
+ getDirectories: (f) => compilerHost.getDirectories(f),
141703
+ realpath: compilerHost.realpath,
141726
141704
  readDirectory: (...args) => compilerHost.readDirectory(...args),
141727
141705
  trace: compilerHost.trace,
141728
141706
  getCurrentDirectory: compilerHost.getCurrentDirectory,
@@ -2221,7 +2221,7 @@ declare namespace ts {
2221
2221
  getSourceFileByPath(path: Path): SourceFile | undefined;
2222
2222
  getCurrentDirectory(): string;
2223
2223
  }
2224
- interface ParseConfigHost {
2224
+ interface ParseConfigHost extends ModuleResolutionHost {
2225
2225
  useCaseSensitiveFileNames: boolean;
2226
2226
  readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
2227
2227
  /**
package/lib/typescript.js CHANGED
@@ -7422,6 +7422,7 @@ ${lanes.join("\n")}
7422
7422
  The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),
7423
7423
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
7424
7424
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
7425
+ Unexpected_token_Did_you_mean_0: diag(1496, 1 /* Error */, "Unexpected_token_Did_you_mean_0_1496", "Unexpected token. Did you mean '{0}'?"),
7425
7426
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
7426
7427
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
7427
7428
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -10321,6 +10322,10 @@ ${lanes.join("\n")}
10321
10322
  case 33 /* exclamation */:
10322
10323
  if (text.charCodeAt(pos + 1) === 61 /* equals */) {
10323
10324
  if (text.charCodeAt(pos + 2) === 61 /* equals */) {
10325
+ if (text.charCodeAt(pos + 3) === 61 /* equals */) {
10326
+ error2(Diagnostics.Unexpected_token_Did_you_mean_0, pos, 4, "!==");
10327
+ return pos += 4, token = 38 /* ExclamationEqualsEqualsToken */;
10328
+ }
10324
10329
  return pos += 3, token = 38 /* ExclamationEqualsEqualsToken */;
10325
10330
  }
10326
10331
  return pos += 2, token = 36 /* ExclamationEqualsToken */;
@@ -61941,37 +61946,7 @@ ${lanes.join("\n")}
61941
61946
  const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
61942
61947
  for (let i = 0; i < paramCount; i++) {
61943
61948
  const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
61944
- let targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
61945
- if (i === restIndex && targetType && sourceType && isTupleType(sourceType)) {
61946
- targetType = mapType(targetType, (t) => {
61947
- if (!isTupleType(t) || // When both sides are tuples of the same structure, we don't want to "propagate" types from elements of variable positions
61948
- // to the following positions as that would disallow signatures of the exact same structures when trailing fixed elements are involved:
61949
- //
61950
- // let fn: (...rest: [...string[], number]) => void = (...rest: [...string[], number]) => {}; // ok
61951
- //
61952
- // Since we want to allow contextual types to flow into paremeters, we don't need to differentiate between rest and variadic elements
61953
- // as that doesn't affect the contextual type of the parameter
61954
- isTupleTypeStructureMatching(sourceType, t, 2 /* MatchVariable */)) {
61955
- return t;
61956
- }
61957
- const elementTypes = [];
61958
- const elementFlags = [];
61959
- const sourceArity = getTypeReferenceArity(sourceType);
61960
- const targetArity = getTypeReferenceArity(t);
61961
- for (let i2 = 0; i2 < sourceArity; i2++) {
61962
- if (i2 >= targetArity) {
61963
- if (sourceType.target.elementFlags[i2] & 3 /* Fixed */) {
61964
- elementTypes.push(undefinedType);
61965
- elementFlags.push(sourceType.target.elementFlags[i2]);
61966
- }
61967
- continue;
61968
- }
61969
- elementTypes.push(getTupleElementType(t, i2));
61970
- elementFlags.push(sourceType.target.elementFlags[i2]);
61971
- }
61972
- return createTupleType(elementTypes, elementFlags);
61973
- });
61974
- }
61949
+ const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
61975
61950
  if (sourceType && targetType) {
61976
61951
  const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
61977
61952
  const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
@@ -65154,11 +65129,8 @@ ${lanes.join("\n")}
65154
65129
  }
65155
65130
  return void 0;
65156
65131
  }
65157
- function isTupleTypeStructureMatching(t1, t2, tupleStructureComparisonKind) {
65158
- return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f1, i) => {
65159
- const f2 = t2.target.elementFlags[i];
65160
- return f1 === f2 || !!(tupleStructureComparisonKind & 1 /* MatchFixed */ && f1 & 3 /* Fixed */ && f2 & 3 /* Fixed */) || !!(tupleStructureComparisonKind & 2 /* MatchVariable */ && f1 & 12 /* Variable */ && f2 & 12 /* Variable */);
65161
- });
65132
+ function isTupleTypeStructureMatching(t1, t2) {
65133
+ return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f, i) => (f & 12 /* Variable */) === (t2.target.elementFlags[i] & 12 /* Variable */));
65162
65134
  }
65163
65135
  function isZeroBigInt({ value }) {
65164
65136
  return value.base10Value === "0";
@@ -66354,7 +66326,7 @@ ${lanes.join("\n")}
66354
66326
  const targetArity = getTypeReferenceArity(target);
66355
66327
  const elementTypes = getTypeArguments(target);
66356
66328
  const elementFlags = target.target.elementFlags;
66357
- if (isTupleType(source) && isTupleTypeStructureMatching(source, target, 1 /* MatchFixed */)) {
66329
+ if (isTupleType(source) && isTupleTypeStructureMatching(source, target)) {
66358
66330
  for (let i = 0; i < targetArity; i++) {
66359
66331
  inferFromTypes(getTypeArguments(source)[i], elementTypes[i]);
66360
66332
  }
@@ -121381,6 +121353,9 @@ ${lanes.join("\n")}
121381
121353
  return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth);
121382
121354
  },
121383
121355
  readFile: (f) => directoryStructureHost.readFile(f),
121356
+ directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists),
121357
+ getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories),
121358
+ realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath),
121384
121359
  useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
121385
121360
  getCurrentDirectory: () => host.getCurrentDirectory(),
121386
121361
  onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined,
@@ -141738,6 +141713,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
141738
141713
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
141739
141714
  fileExists: (fileName) => compilerHost.fileExists(fileName),
141740
141715
  readFile: (fileName) => compilerHost.readFile(fileName),
141716
+ directoryExists: (f) => compilerHost.directoryExists(f),
141717
+ getDirectories: (f) => compilerHost.getDirectories(f),
141718
+ realpath: compilerHost.realpath,
141741
141719
  readDirectory: (...args) => compilerHost.readDirectory(...args),
141742
141720
  trace: compilerHost.trace,
141743
141721
  getCurrentDirectory: compilerHost.getCurrentDirectory,
@@ -5492,6 +5492,7 @@ var Diagnostics = {
5492
5492
  The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),
5493
5493
  The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),
5494
5494
  _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."),
5495
+ Unexpected_token_Did_you_mean_0: diag(1496, 1 /* Error */, "Unexpected_token_Did_you_mean_0_1496", "Unexpected token. Did you mean '{0}'?"),
5495
5496
  The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
5496
5497
  The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
5497
5498
  Call_signature_return_types_0_and_1_are_incompatible: diag(
@@ -8472,6 +8473,10 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8472
8473
  case 33 /* exclamation */:
8473
8474
  if (text.charCodeAt(pos + 1) === 61 /* equals */) {
8474
8475
  if (text.charCodeAt(pos + 2) === 61 /* equals */) {
8476
+ if (text.charCodeAt(pos + 3) === 61 /* equals */) {
8477
+ error(Diagnostics.Unexpected_token_Did_you_mean_0, pos, 4, "!==");
8478
+ return pos += 4, token = 38 /* ExclamationEqualsEqualsToken */;
8479
+ }
8475
8480
  return pos += 3, token = 38 /* ExclamationEqualsEqualsToken */;
8476
8481
  }
8477
8482
  return pos += 2, token = 36 /* ExclamationEqualsToken */;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.2.0-pr-49218-24",
5
+ "version": "5.2.0-pr-54891-7",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -115,5 +115,5 @@
115
115
  "node": "20.1.0",
116
116
  "npm": "8.19.4"
117
117
  },
118
- "gitHead": "f606b3c7639589dc74f8db612faba767e394c163"
118
+ "gitHead": "10d90775d78339c5ac584cfad4943b07e0f2c868"
119
119
  }