typescript 5.2.0-dev.20230705 → 5.2.0-dev.20230707

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.2";
21
- var version = `${versionMajorMinor}.0-dev.20230705`;
21
+ var version = `${versionMajorMinor}.0-dev.20230707`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -8573,7 +8573,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8573
8573
  if (withMinus)
8574
8574
  start2--;
8575
8575
  error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);
8576
- return { type: 9 /* NumericLiteral */, value: tokenValue };
8576
+ return 9 /* NumericLiteral */;
8577
8577
  }
8578
8578
  } else {
8579
8579
  mainFragment = scanNumberFragment();
@@ -8613,20 +8613,18 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8613
8613
  }
8614
8614
  if (tokenFlags & 8192 /* ContainsLeadingZero */) {
8615
8615
  error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);
8616
- return { type: 9 /* NumericLiteral */, value: "" + +result };
8616
+ tokenValue = "" + +result;
8617
+ return 9 /* NumericLiteral */;
8617
8618
  }
8618
8619
  if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
8619
8620
  checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
8620
- return {
8621
- type: 9 /* NumericLiteral */,
8622
- value: "" + +result
8623
- // if value is not an integer, it can be safely coerced to a number
8624
- };
8621
+ tokenValue = "" + +result;
8622
+ return 9 /* NumericLiteral */;
8625
8623
  } else {
8626
8624
  tokenValue = result;
8627
8625
  const type = checkBigIntSuffix();
8628
8626
  checkForIdentifierStartAfterNumericLiteral(start2);
8629
- return { type, value: tokenValue };
8627
+ return type;
8630
8628
  }
8631
8629
  }
8632
8630
  function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
@@ -9235,7 +9233,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9235
9233
  return token = 41 /* MinusToken */;
9236
9234
  case 46 /* dot */:
9237
9235
  if (isDigit(text.charCodeAt(pos + 1))) {
9238
- tokenValue = scanNumber().value;
9236
+ scanNumber();
9239
9237
  return token = 9 /* NumericLiteral */;
9240
9238
  }
9241
9239
  if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
@@ -9353,8 +9351,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
9353
9351
  case 55 /* _7 */:
9354
9352
  case 56 /* _8 */:
9355
9353
  case 57 /* _9 */:
9356
- ({ type: token, value: tokenValue } = scanNumber());
9357
- return token;
9354
+ return token = scanNumber();
9358
9355
  case 58 /* colon */:
9359
9356
  pos++;
9360
9357
  return token = 59 /* ColonToken */;
@@ -43766,7 +43763,7 @@ function createTypeChecker(host) {
43766
43763
  };
43767
43764
  var amalgamatedDuplicates;
43768
43765
  var reverseMappedCache = /* @__PURE__ */ new Map();
43769
- var inInferTypeForHomomorphicMappedType = false;
43766
+ var homomorphicMappedTypeInferenceStack = [];
43770
43767
  var ambientModulesCache;
43771
43768
  var patternAmbientModules;
43772
43769
  var patternAmbientModuleAugmentations;
@@ -48357,6 +48354,7 @@ function createTypeChecker(host) {
48357
48354
  );
48358
48355
  }
48359
48356
  function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
48357
+ var _a;
48360
48358
  const suppressAny = context.flags & 256 /* SuppressAnyReturnType */;
48361
48359
  if (suppressAny)
48362
48360
  context.flags &= ~256 /* SuppressAnyReturnType */;
@@ -48492,6 +48490,20 @@ function createTypeChecker(host) {
48492
48490
  if (typeArguments) {
48493
48491
  node.typeArguments = factory.createNodeArray(typeArguments);
48494
48492
  }
48493
+ if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) {
48494
+ const comment = getTextOfNode(
48495
+ signature.declaration.parent.parent,
48496
+ /*includeTrivia*/
48497
+ true
48498
+ ).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n");
48499
+ addSyntheticLeadingComment(
48500
+ node,
48501
+ 3 /* MultiLineCommentTrivia */,
48502
+ comment,
48503
+ /*hasTrailingNewLine*/
48504
+ true
48505
+ );
48506
+ }
48495
48507
  cleanup == null ? void 0 : cleanup();
48496
48508
  return node;
48497
48509
  }
@@ -63155,17 +63167,18 @@ function createTypeChecker(host) {
63155
63167
  );
63156
63168
  }
63157
63169
  function inferTypeForHomomorphicMappedType(source, target, constraint) {
63158
- if (inInferTypeForHomomorphicMappedType) {
63159
- return void 0;
63170
+ const cacheKey = source.id + "," + target.id + "," + constraint.id;
63171
+ if (reverseMappedCache.has(cacheKey)) {
63172
+ return reverseMappedCache.get(cacheKey);
63160
63173
  }
63161
- const key = source.id + "," + target.id + "," + constraint.id;
63162
- if (reverseMappedCache.has(key)) {
63163
- return reverseMappedCache.get(key);
63174
+ const recursionKey = source.id + "," + (target.target || target).id;
63175
+ if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) {
63176
+ return void 0;
63164
63177
  }
63165
- inInferTypeForHomomorphicMappedType = true;
63178
+ homomorphicMappedTypeInferenceStack.push(recursionKey);
63166
63179
  const type = createReverseMappedType(source, target, constraint);
63167
- inInferTypeForHomomorphicMappedType = false;
63168
- reverseMappedCache.set(key, type);
63180
+ homomorphicMappedTypeInferenceStack.pop();
63181
+ reverseMappedCache.set(cacheKey, type);
63169
63182
  return type;
63170
63183
  }
63171
63184
  function isPartiallyInferableType(type) {
package/lib/tsserver.js CHANGED
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
2327
2327
 
2328
2328
  // src/compiler/corePublic.ts
2329
2329
  var versionMajorMinor = "5.2";
2330
- var version = `${versionMajorMinor}.0-dev.20230705`;
2330
+ var version = `${versionMajorMinor}.0-dev.20230707`;
2331
2331
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2332
2332
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2333
2333
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -12115,7 +12115,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12115
12115
  if (withMinus)
12116
12116
  start3--;
12117
12117
  error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start3, pos - start3, literal);
12118
- return { type: 9 /* NumericLiteral */, value: tokenValue };
12118
+ return 9 /* NumericLiteral */;
12119
12119
  }
12120
12120
  } else {
12121
12121
  mainFragment = scanNumberFragment();
@@ -12155,20 +12155,18 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12155
12155
  }
12156
12156
  if (tokenFlags & 8192 /* ContainsLeadingZero */) {
12157
12157
  error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start3, end2 - start3);
12158
- return { type: 9 /* NumericLiteral */, value: "" + +result };
12158
+ tokenValue = "" + +result;
12159
+ return 9 /* NumericLiteral */;
12159
12160
  }
12160
12161
  if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
12161
12162
  checkForIdentifierStartAfterNumericLiteral(start3, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
12162
- return {
12163
- type: 9 /* NumericLiteral */,
12164
- value: "" + +result
12165
- // if value is not an integer, it can be safely coerced to a number
12166
- };
12163
+ tokenValue = "" + +result;
12164
+ return 9 /* NumericLiteral */;
12167
12165
  } else {
12168
12166
  tokenValue = result;
12169
12167
  const type = checkBigIntSuffix();
12170
12168
  checkForIdentifierStartAfterNumericLiteral(start3);
12171
- return { type, value: tokenValue };
12169
+ return type;
12172
12170
  }
12173
12171
  }
12174
12172
  function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
@@ -12777,7 +12775,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12777
12775
  return token = 41 /* MinusToken */;
12778
12776
  case 46 /* dot */:
12779
12777
  if (isDigit(text.charCodeAt(pos + 1))) {
12780
- tokenValue = scanNumber().value;
12778
+ scanNumber();
12781
12779
  return token = 9 /* NumericLiteral */;
12782
12780
  }
12783
12781
  if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
@@ -12895,8 +12893,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
12895
12893
  case 55 /* _7 */:
12896
12894
  case 56 /* _8 */:
12897
12895
  case 57 /* _9 */:
12898
- ({ type: token, value: tokenValue } = scanNumber());
12899
- return token;
12896
+ return token = scanNumber();
12900
12897
  case 58 /* colon */:
12901
12898
  pos++;
12902
12899
  return token = 59 /* ColonToken */;
@@ -48442,7 +48439,7 @@ function createTypeChecker(host) {
48442
48439
  };
48443
48440
  var amalgamatedDuplicates;
48444
48441
  var reverseMappedCache = /* @__PURE__ */ new Map();
48445
- var inInferTypeForHomomorphicMappedType = false;
48442
+ var homomorphicMappedTypeInferenceStack = [];
48446
48443
  var ambientModulesCache;
48447
48444
  var patternAmbientModules;
48448
48445
  var patternAmbientModuleAugmentations;
@@ -53033,6 +53030,7 @@ function createTypeChecker(host) {
53033
53030
  );
53034
53031
  }
53035
53032
  function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
53033
+ var _a;
53036
53034
  const suppressAny = context.flags & 256 /* SuppressAnyReturnType */;
53037
53035
  if (suppressAny)
53038
53036
  context.flags &= ~256 /* SuppressAnyReturnType */;
@@ -53168,6 +53166,20 @@ function createTypeChecker(host) {
53168
53166
  if (typeArguments) {
53169
53167
  node.typeArguments = factory.createNodeArray(typeArguments);
53170
53168
  }
53169
+ if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) {
53170
+ const comment = getTextOfNode(
53171
+ signature.declaration.parent.parent,
53172
+ /*includeTrivia*/
53173
+ true
53174
+ ).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n");
53175
+ addSyntheticLeadingComment(
53176
+ node,
53177
+ 3 /* MultiLineCommentTrivia */,
53178
+ comment,
53179
+ /*hasTrailingNewLine*/
53180
+ true
53181
+ );
53182
+ }
53171
53183
  cleanup == null ? void 0 : cleanup();
53172
53184
  return node;
53173
53185
  }
@@ -67831,17 +67843,18 @@ function createTypeChecker(host) {
67831
67843
  );
67832
67844
  }
67833
67845
  function inferTypeForHomomorphicMappedType(source, target, constraint) {
67834
- if (inInferTypeForHomomorphicMappedType) {
67835
- return void 0;
67846
+ const cacheKey = source.id + "," + target.id + "," + constraint.id;
67847
+ if (reverseMappedCache.has(cacheKey)) {
67848
+ return reverseMappedCache.get(cacheKey);
67836
67849
  }
67837
- const key = source.id + "," + target.id + "," + constraint.id;
67838
- if (reverseMappedCache.has(key)) {
67839
- return reverseMappedCache.get(key);
67850
+ const recursionKey = source.id + "," + (target.target || target).id;
67851
+ if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) {
67852
+ return void 0;
67840
67853
  }
67841
- inInferTypeForHomomorphicMappedType = true;
67854
+ homomorphicMappedTypeInferenceStack.push(recursionKey);
67842
67855
  const type = createReverseMappedType(source, target, constraint);
67843
- inInferTypeForHomomorphicMappedType = false;
67844
- reverseMappedCache.set(key, type);
67856
+ homomorphicMappedTypeInferenceStack.pop();
67857
+ reverseMappedCache.set(cacheKey, type);
67845
67858
  return type;
67846
67859
  }
67847
67860
  function isPartiallyInferableType(type) {
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-dev.20230705`;
38
+ version = `${versionMajorMinor}.0-dev.20230707`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9739,7 +9739,7 @@ ${lanes.join("\n")}
9739
9739
  if (withMinus)
9740
9740
  start2--;
9741
9741
  error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);
9742
- return { type: 9 /* NumericLiteral */, value: tokenValue };
9742
+ return 9 /* NumericLiteral */;
9743
9743
  }
9744
9744
  } else {
9745
9745
  mainFragment = scanNumberFragment();
@@ -9779,20 +9779,18 @@ ${lanes.join("\n")}
9779
9779
  }
9780
9780
  if (tokenFlags & 8192 /* ContainsLeadingZero */) {
9781
9781
  error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);
9782
- return { type: 9 /* NumericLiteral */, value: "" + +result };
9782
+ tokenValue = "" + +result;
9783
+ return 9 /* NumericLiteral */;
9783
9784
  }
9784
9785
  if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
9785
9786
  checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
9786
- return {
9787
- type: 9 /* NumericLiteral */,
9788
- value: "" + +result
9789
- // if value is not an integer, it can be safely coerced to a number
9790
- };
9787
+ tokenValue = "" + +result;
9788
+ return 9 /* NumericLiteral */;
9791
9789
  } else {
9792
9790
  tokenValue = result;
9793
9791
  const type = checkBigIntSuffix();
9794
9792
  checkForIdentifierStartAfterNumericLiteral(start2);
9795
- return { type, value: tokenValue };
9793
+ return type;
9796
9794
  }
9797
9795
  }
9798
9796
  function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
@@ -10401,7 +10399,7 @@ ${lanes.join("\n")}
10401
10399
  return token = 41 /* MinusToken */;
10402
10400
  case 46 /* dot */:
10403
10401
  if (isDigit(text.charCodeAt(pos + 1))) {
10404
- tokenValue = scanNumber().value;
10402
+ scanNumber();
10405
10403
  return token = 9 /* NumericLiteral */;
10406
10404
  }
10407
10405
  if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
@@ -10519,8 +10517,7 @@ ${lanes.join("\n")}
10519
10517
  case 55 /* _7 */:
10520
10518
  case 56 /* _8 */:
10521
10519
  case 57 /* _9 */:
10522
- ({ type: token, value: tokenValue } = scanNumber());
10523
- return token;
10520
+ return token = scanNumber();
10524
10521
  case 58 /* colon */:
10525
10522
  pos++;
10526
10523
  return token = 59 /* ColonToken */;
@@ -46209,7 +46206,7 @@ ${lanes.join("\n")}
46209
46206
  };
46210
46207
  var amalgamatedDuplicates;
46211
46208
  var reverseMappedCache = /* @__PURE__ */ new Map();
46212
- var inInferTypeForHomomorphicMappedType = false;
46209
+ var homomorphicMappedTypeInferenceStack = [];
46213
46210
  var ambientModulesCache;
46214
46211
  var patternAmbientModules;
46215
46212
  var patternAmbientModuleAugmentations;
@@ -50800,6 +50797,7 @@ ${lanes.join("\n")}
50800
50797
  );
50801
50798
  }
50802
50799
  function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
50800
+ var _a;
50803
50801
  const suppressAny = context.flags & 256 /* SuppressAnyReturnType */;
50804
50802
  if (suppressAny)
50805
50803
  context.flags &= ~256 /* SuppressAnyReturnType */;
@@ -50935,6 +50933,20 @@ ${lanes.join("\n")}
50935
50933
  if (typeArguments) {
50936
50934
  node.typeArguments = factory.createNodeArray(typeArguments);
50937
50935
  }
50936
+ if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) {
50937
+ const comment = getTextOfNode(
50938
+ signature.declaration.parent.parent,
50939
+ /*includeTrivia*/
50940
+ true
50941
+ ).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n");
50942
+ addSyntheticLeadingComment(
50943
+ node,
50944
+ 3 /* MultiLineCommentTrivia */,
50945
+ comment,
50946
+ /*hasTrailingNewLine*/
50947
+ true
50948
+ );
50949
+ }
50938
50950
  cleanup == null ? void 0 : cleanup();
50939
50951
  return node;
50940
50952
  }
@@ -65598,17 +65610,18 @@ ${lanes.join("\n")}
65598
65610
  );
65599
65611
  }
65600
65612
  function inferTypeForHomomorphicMappedType(source, target, constraint) {
65601
- if (inInferTypeForHomomorphicMappedType) {
65602
- return void 0;
65613
+ const cacheKey = source.id + "," + target.id + "," + constraint.id;
65614
+ if (reverseMappedCache.has(cacheKey)) {
65615
+ return reverseMappedCache.get(cacheKey);
65603
65616
  }
65604
- const key = source.id + "," + target.id + "," + constraint.id;
65605
- if (reverseMappedCache.has(key)) {
65606
- return reverseMappedCache.get(key);
65617
+ const recursionKey = source.id + "," + (target.target || target).id;
65618
+ if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) {
65619
+ return void 0;
65607
65620
  }
65608
- inInferTypeForHomomorphicMappedType = true;
65621
+ homomorphicMappedTypeInferenceStack.push(recursionKey);
65609
65622
  const type = createReverseMappedType(source, target, constraint);
65610
- inInferTypeForHomomorphicMappedType = false;
65611
- reverseMappedCache.set(key, type);
65623
+ homomorphicMappedTypeInferenceStack.pop();
65624
+ reverseMappedCache.set(cacheKey, type);
65612
65625
  return type;
65613
65626
  }
65614
65627
  function isPartiallyInferableType(type) {
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-dev.20230705`;
38
+ version = `${versionMajorMinor}.0-dev.20230707`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9739,7 +9739,7 @@ ${lanes.join("\n")}
9739
9739
  if (withMinus)
9740
9740
  start2--;
9741
9741
  error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);
9742
- return { type: 9 /* NumericLiteral */, value: tokenValue };
9742
+ return 9 /* NumericLiteral */;
9743
9743
  }
9744
9744
  } else {
9745
9745
  mainFragment = scanNumberFragment();
@@ -9779,20 +9779,18 @@ ${lanes.join("\n")}
9779
9779
  }
9780
9780
  if (tokenFlags & 8192 /* ContainsLeadingZero */) {
9781
9781
  error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);
9782
- return { type: 9 /* NumericLiteral */, value: "" + +result };
9782
+ tokenValue = "" + +result;
9783
+ return 9 /* NumericLiteral */;
9783
9784
  }
9784
9785
  if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
9785
9786
  checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
9786
- return {
9787
- type: 9 /* NumericLiteral */,
9788
- value: "" + +result
9789
- // if value is not an integer, it can be safely coerced to a number
9790
- };
9787
+ tokenValue = "" + +result;
9788
+ return 9 /* NumericLiteral */;
9791
9789
  } else {
9792
9790
  tokenValue = result;
9793
9791
  const type = checkBigIntSuffix();
9794
9792
  checkForIdentifierStartAfterNumericLiteral(start2);
9795
- return { type, value: tokenValue };
9793
+ return type;
9796
9794
  }
9797
9795
  }
9798
9796
  function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
@@ -10401,7 +10399,7 @@ ${lanes.join("\n")}
10401
10399
  return token = 41 /* MinusToken */;
10402
10400
  case 46 /* dot */:
10403
10401
  if (isDigit(text.charCodeAt(pos + 1))) {
10404
- tokenValue = scanNumber().value;
10402
+ scanNumber();
10405
10403
  return token = 9 /* NumericLiteral */;
10406
10404
  }
10407
10405
  if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
@@ -10519,8 +10517,7 @@ ${lanes.join("\n")}
10519
10517
  case 55 /* _7 */:
10520
10518
  case 56 /* _8 */:
10521
10519
  case 57 /* _9 */:
10522
- ({ type: token, value: tokenValue } = scanNumber());
10523
- return token;
10520
+ return token = scanNumber();
10524
10521
  case 58 /* colon */:
10525
10522
  pos++;
10526
10523
  return token = 59 /* ColonToken */;
@@ -46209,7 +46206,7 @@ ${lanes.join("\n")}
46209
46206
  };
46210
46207
  var amalgamatedDuplicates;
46211
46208
  var reverseMappedCache = /* @__PURE__ */ new Map();
46212
- var inInferTypeForHomomorphicMappedType = false;
46209
+ var homomorphicMappedTypeInferenceStack = [];
46213
46210
  var ambientModulesCache;
46214
46211
  var patternAmbientModules;
46215
46212
  var patternAmbientModuleAugmentations;
@@ -50800,6 +50797,7 @@ ${lanes.join("\n")}
50800
50797
  );
50801
50798
  }
50802
50799
  function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
50800
+ var _a;
50803
50801
  const suppressAny = context.flags & 256 /* SuppressAnyReturnType */;
50804
50802
  if (suppressAny)
50805
50803
  context.flags &= ~256 /* SuppressAnyReturnType */;
@@ -50935,6 +50933,20 @@ ${lanes.join("\n")}
50935
50933
  if (typeArguments) {
50936
50934
  node.typeArguments = factory.createNodeArray(typeArguments);
50937
50935
  }
50936
+ if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) {
50937
+ const comment = getTextOfNode(
50938
+ signature.declaration.parent.parent,
50939
+ /*includeTrivia*/
50940
+ true
50941
+ ).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n");
50942
+ addSyntheticLeadingComment(
50943
+ node,
50944
+ 3 /* MultiLineCommentTrivia */,
50945
+ comment,
50946
+ /*hasTrailingNewLine*/
50947
+ true
50948
+ );
50949
+ }
50938
50950
  cleanup == null ? void 0 : cleanup();
50939
50951
  return node;
50940
50952
  }
@@ -65598,17 +65610,18 @@ ${lanes.join("\n")}
65598
65610
  );
65599
65611
  }
65600
65612
  function inferTypeForHomomorphicMappedType(source, target, constraint) {
65601
- if (inInferTypeForHomomorphicMappedType) {
65602
- return void 0;
65613
+ const cacheKey = source.id + "," + target.id + "," + constraint.id;
65614
+ if (reverseMappedCache.has(cacheKey)) {
65615
+ return reverseMappedCache.get(cacheKey);
65603
65616
  }
65604
- const key = source.id + "," + target.id + "," + constraint.id;
65605
- if (reverseMappedCache.has(key)) {
65606
- return reverseMappedCache.get(key);
65617
+ const recursionKey = source.id + "," + (target.target || target).id;
65618
+ if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) {
65619
+ return void 0;
65607
65620
  }
65608
- inInferTypeForHomomorphicMappedType = true;
65621
+ homomorphicMappedTypeInferenceStack.push(recursionKey);
65609
65622
  const type = createReverseMappedType(source, target, constraint);
65610
- inInferTypeForHomomorphicMappedType = false;
65611
- reverseMappedCache.set(key, type);
65623
+ homomorphicMappedTypeInferenceStack.pop();
65624
+ reverseMappedCache.set(cacheKey, type);
65612
65625
  return type;
65613
65626
  }
65614
65627
  function isPartiallyInferableType(type) {
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.2";
57
- var version = `${versionMajorMinor}.0-dev.20230705`;
57
+ var version = `${versionMajorMinor}.0-dev.20230707`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -7890,7 +7890,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
7890
7890
  if (withMinus)
7891
7891
  start2--;
7892
7892
  error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);
7893
- return { type: 9 /* NumericLiteral */, value: tokenValue };
7893
+ return 9 /* NumericLiteral */;
7894
7894
  }
7895
7895
  } else {
7896
7896
  mainFragment = scanNumberFragment();
@@ -7930,20 +7930,18 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
7930
7930
  }
7931
7931
  if (tokenFlags & 8192 /* ContainsLeadingZero */) {
7932
7932
  error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);
7933
- return { type: 9 /* NumericLiteral */, value: "" + +result };
7933
+ tokenValue = "" + +result;
7934
+ return 9 /* NumericLiteral */;
7934
7935
  }
7935
7936
  if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
7936
7937
  checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
7937
- return {
7938
- type: 9 /* NumericLiteral */,
7939
- value: "" + +result
7940
- // if value is not an integer, it can be safely coerced to a number
7941
- };
7938
+ tokenValue = "" + +result;
7939
+ return 9 /* NumericLiteral */;
7942
7940
  } else {
7943
7941
  tokenValue = result;
7944
7942
  const type = checkBigIntSuffix();
7945
7943
  checkForIdentifierStartAfterNumericLiteral(start2);
7946
- return { type, value: tokenValue };
7944
+ return type;
7947
7945
  }
7948
7946
  }
7949
7947
  function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) {
@@ -8552,7 +8550,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8552
8550
  return token = 41 /* MinusToken */;
8553
8551
  case 46 /* dot */:
8554
8552
  if (isDigit(text.charCodeAt(pos + 1))) {
8555
- tokenValue = scanNumber().value;
8553
+ scanNumber();
8556
8554
  return token = 9 /* NumericLiteral */;
8557
8555
  }
8558
8556
  if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) {
@@ -8670,8 +8668,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
8670
8668
  case 55 /* _7 */:
8671
8669
  case 56 /* _8 */:
8672
8670
  case 57 /* _9 */:
8673
- ({ type: token, value: tokenValue } = scanNumber());
8674
- return token;
8671
+ return token = scanNumber();
8675
8672
  case 58 /* colon */:
8676
8673
  pos++;
8677
8674
  return token = 59 /* ColonToken */;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.2.0-dev.20230705",
5
+ "version": "5.2.0-dev.20230707",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "e89d42d373a570f12510429e13ec45a9eccd9ed0"
117
+ "gitHead": "e374eba37c002aa8238f00f77a34673a7536f5b1"
118
118
  }