typescript 5.0.0-dev.20230131 → 5.0.0-dev.20230201

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
@@ -23,7 +23,7 @@ var __export = (target, all) => {
23
23
 
24
24
  // src/compiler/corePublic.ts
25
25
  var versionMajorMinor = "5.0";
26
- var version = `${versionMajorMinor}.0-dev.20230131`;
26
+ var version = `${versionMajorMinor}.0-dev.20230201`;
27
27
 
28
28
  // src/compiler/core.ts
29
29
  var emptyArray = [];
@@ -7435,6 +7435,7 @@ var Diagnostics = {
7435
7435
  new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, 1 /* Error */, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),
7436
7436
  _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, 1 /* Error */, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),
7437
7437
  Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, 1 /* Error */, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),
7438
+ This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: diag(7012, 1 /* Error */, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."),
7438
7439
  Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, 1 /* Error */, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),
7439
7440
  Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, 1 /* Error */, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),
7440
7441
  Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, 1 /* Error */, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."),
@@ -16499,7 +16500,7 @@ function rangeOfNode(node) {
16499
16500
  }
16500
16501
  function rangeOfTypeParameters(sourceFile, typeParameters) {
16501
16502
  const pos = typeParameters.pos - 1;
16502
- const end = skipTrivia(sourceFile.text, typeParameters.end) + 1;
16503
+ const end = Math.min(sourceFile.text.length, skipTrivia(sourceFile.text, typeParameters.end) + 1);
16503
16504
  return { pos, end };
16504
16505
  }
16505
16506
  function skipTypeChecking(sourceFile, options, host) {
@@ -28567,6 +28568,7 @@ var Parser;
28567
28568
  switch (fourth) {
28568
28569
  case 63 /* EqualsToken */:
28569
28570
  case 31 /* GreaterThanToken */:
28571
+ case 43 /* SlashToken */:
28570
28572
  return false;
28571
28573
  default:
28572
28574
  return true;
@@ -53593,6 +53595,12 @@ function createTypeChecker(host) {
53593
53595
  thisParameter = getAnnotatedAccessorThisParameter(other);
53594
53596
  }
53595
53597
  }
53598
+ if (isInJSFile(declaration)) {
53599
+ const thisTag = getJSDocThisTag(declaration);
53600
+ if (thisTag && thisTag.typeExpression) {
53601
+ thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression));
53602
+ }
53603
+ }
53596
53604
  const classType = declaration.kind === 173 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0;
53597
53605
  const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
53598
53606
  if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) {
@@ -53706,7 +53714,11 @@ function createTypeChecker(host) {
53706
53714
  if (node.tags) {
53707
53715
  for (const tag of node.tags) {
53708
53716
  if (isJSDocOverloadTag(tag)) {
53709
- result.push(getSignatureFromDeclaration(tag.typeExpression));
53717
+ const jsDocSignature = tag.typeExpression;
53718
+ if (jsDocSignature.type === void 0) {
53719
+ reportImplicitAny(jsDocSignature, anyType);
53720
+ }
53721
+ result.push(getSignatureFromDeclaration(jsDocSignature));
53710
53722
  hasJSDocOverloads = true;
53711
53723
  }
53712
53724
  }
@@ -61655,6 +61667,11 @@ function createTypeChecker(host) {
61655
61667
  case 320 /* JSDocFunctionType */:
61656
61668
  error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
61657
61669
  return;
61670
+ case 326 /* JSDocSignature */:
61671
+ if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) {
61672
+ error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString);
61673
+ }
61674
+ return;
61658
61675
  case 259 /* FunctionDeclaration */:
61659
61676
  case 171 /* MethodDeclaration */:
61660
61677
  case 170 /* MethodSignature */:
@@ -64742,7 +64759,7 @@ function createTypeChecker(host) {
64742
64759
  }
64743
64760
  }
64744
64761
  function getTypeOfSymbolAtLocation(symbol, location) {
64745
- symbol = symbol.exportSymbol || symbol;
64762
+ symbol = getExportSymbolOfValueSymbolIfExported(symbol);
64746
64763
  if (location.kind === 79 /* Identifier */ || location.kind === 80 /* PrivateIdentifier */) {
64747
64764
  if (isRightSideOfQualifiedNameOrPropertyAccess(location)) {
64748
64765
  location = location.parent;
@@ -78933,7 +78950,7 @@ function createTypeChecker(host) {
78933
78950
  }
78934
78951
  return node.parent.kind === 180 /* TypeReference */;
78935
78952
  }
78936
- function isHeritageClauseElementIdentifier(node) {
78953
+ function isInNameOfExpressionWithTypeArguments(node) {
78937
78954
  while (node.parent.kind === 208 /* PropertyAccessExpression */) {
78938
78955
  node = node.parent;
78939
78956
  }
@@ -79043,10 +79060,10 @@ function createTypeChecker(host) {
79043
79060
  while (isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(name)) {
79044
79061
  name = name.parent;
79045
79062
  }
79046
- if (isHeritageClauseElementIdentifier(name)) {
79063
+ if (isInNameOfExpressionWithTypeArguments(name)) {
79047
79064
  let meaning = 0 /* None */;
79048
79065
  if (name.parent.kind === 230 /* ExpressionWithTypeArguments */) {
79049
- meaning = 788968 /* Type */;
79066
+ meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */;
79050
79067
  if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) {
79051
79068
  meaning |= 111551 /* Value */;
79052
79069
  }
package/lib/tsserver.js CHANGED
@@ -2378,7 +2378,7 @@ __export(ts_server_exports3, {
2378
2378
 
2379
2379
  // src/compiler/corePublic.ts
2380
2380
  var versionMajorMinor = "5.0";
2381
- var version = `${versionMajorMinor}.0-dev.20230131`;
2381
+ var version = `${versionMajorMinor}.0-dev.20230201`;
2382
2382
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2383
2383
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2384
2384
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -10990,6 +10990,7 @@ var Diagnostics = {
10990
10990
  new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, 1 /* Error */, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),
10991
10991
  _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, 1 /* Error */, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),
10992
10992
  Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, 1 /* Error */, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),
10993
+ This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: diag(7012, 1 /* Error */, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."),
10993
10994
  Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, 1 /* Error */, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),
10994
10995
  Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, 1 /* Error */, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),
10995
10996
  Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, 1 /* Error */, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."),
@@ -20681,7 +20682,7 @@ function rangeOfNode(node) {
20681
20682
  }
20682
20683
  function rangeOfTypeParameters(sourceFile, typeParameters) {
20683
20684
  const pos = typeParameters.pos - 1;
20684
- const end = skipTrivia(sourceFile.text, typeParameters.end) + 1;
20685
+ const end = Math.min(sourceFile.text.length, skipTrivia(sourceFile.text, typeParameters.end) + 1);
20685
20686
  return { pos, end };
20686
20687
  }
20687
20688
  function skipTypeChecking(sourceFile, options, host) {
@@ -32977,6 +32978,7 @@ var Parser;
32977
32978
  switch (fourth) {
32978
32979
  case 63 /* EqualsToken */:
32979
32980
  case 31 /* GreaterThanToken */:
32981
+ case 43 /* SlashToken */:
32980
32982
  return false;
32981
32983
  default:
32982
32984
  return true;
@@ -58251,6 +58253,12 @@ function createTypeChecker(host) {
58251
58253
  thisParameter = getAnnotatedAccessorThisParameter(other);
58252
58254
  }
58253
58255
  }
58256
+ if (isInJSFile(declaration)) {
58257
+ const thisTag = getJSDocThisTag(declaration);
58258
+ if (thisTag && thisTag.typeExpression) {
58259
+ thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression));
58260
+ }
58261
+ }
58254
58262
  const classType = declaration.kind === 173 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0;
58255
58263
  const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
58256
58264
  if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) {
@@ -58364,7 +58372,11 @@ function createTypeChecker(host) {
58364
58372
  if (node.tags) {
58365
58373
  for (const tag of node.tags) {
58366
58374
  if (isJSDocOverloadTag(tag)) {
58367
- result.push(getSignatureFromDeclaration(tag.typeExpression));
58375
+ const jsDocSignature = tag.typeExpression;
58376
+ if (jsDocSignature.type === void 0) {
58377
+ reportImplicitAny(jsDocSignature, anyType);
58378
+ }
58379
+ result.push(getSignatureFromDeclaration(jsDocSignature));
58368
58380
  hasJSDocOverloads = true;
58369
58381
  }
58370
58382
  }
@@ -66313,6 +66325,11 @@ function createTypeChecker(host) {
66313
66325
  case 320 /* JSDocFunctionType */:
66314
66326
  error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
66315
66327
  return;
66328
+ case 326 /* JSDocSignature */:
66329
+ if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) {
66330
+ error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString);
66331
+ }
66332
+ return;
66316
66333
  case 259 /* FunctionDeclaration */:
66317
66334
  case 171 /* MethodDeclaration */:
66318
66335
  case 170 /* MethodSignature */:
@@ -69400,7 +69417,7 @@ function createTypeChecker(host) {
69400
69417
  }
69401
69418
  }
69402
69419
  function getTypeOfSymbolAtLocation(symbol, location) {
69403
- symbol = symbol.exportSymbol || symbol;
69420
+ symbol = getExportSymbolOfValueSymbolIfExported(symbol);
69404
69421
  if (location.kind === 79 /* Identifier */ || location.kind === 80 /* PrivateIdentifier */) {
69405
69422
  if (isRightSideOfQualifiedNameOrPropertyAccess(location)) {
69406
69423
  location = location.parent;
@@ -83591,7 +83608,7 @@ function createTypeChecker(host) {
83591
83608
  }
83592
83609
  return node.parent.kind === 180 /* TypeReference */;
83593
83610
  }
83594
- function isHeritageClauseElementIdentifier(node) {
83611
+ function isInNameOfExpressionWithTypeArguments(node) {
83595
83612
  while (node.parent.kind === 208 /* PropertyAccessExpression */) {
83596
83613
  node = node.parent;
83597
83614
  }
@@ -83701,10 +83718,10 @@ function createTypeChecker(host) {
83701
83718
  while (isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(name)) {
83702
83719
  name = name.parent;
83703
83720
  }
83704
- if (isHeritageClauseElementIdentifier(name)) {
83721
+ if (isInNameOfExpressionWithTypeArguments(name)) {
83705
83722
  let meaning = 0 /* None */;
83706
83723
  if (name.parent.kind === 230 /* ExpressionWithTypeArguments */) {
83707
- meaning = 788968 /* Type */;
83724
+ meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */;
83708
83725
  if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) {
83709
83726
  meaning |= 111551 /* Value */;
83710
83727
  }
@@ -130627,7 +130644,7 @@ function getModuleSpecifierResolverHost(program, host) {
130627
130644
  };
130628
130645
  }
130629
130646
  function moduleResolutionUsesNodeModules(moduleResolution) {
130630
- return moduleResolution === 2 /* Node10 */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */;
130647
+ return moduleResolution === 2 /* Node10 */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */;
130631
130648
  }
130632
130649
  function makeImportIfNecessary(defaultImport, namedImports, moduleSpecifier, quotePreference) {
130633
130650
  return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImports, moduleSpecifier, quotePreference) : void 0;
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.0";
38
- version = `${versionMajorMinor}.0-dev.20230131`;
38
+ version = `${versionMajorMinor}.0-dev.20230201`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -8722,6 +8722,7 @@ ${lanes.join("\n")}
8722
8722
  new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, 1 /* Error */, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),
8723
8723
  _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, 1 /* Error */, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),
8724
8724
  Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, 1 /* Error */, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),
8725
+ This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: diag(7012, 1 /* Error */, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."),
8725
8726
  Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, 1 /* Error */, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),
8726
8727
  Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, 1 /* Error */, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),
8727
8728
  Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, 1 /* Error */, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."),
@@ -18251,7 +18252,7 @@ ${lanes.join("\n")}
18251
18252
  }
18252
18253
  function rangeOfTypeParameters(sourceFile, typeParameters) {
18253
18254
  const pos = typeParameters.pos - 1;
18254
- const end = skipTrivia(sourceFile.text, typeParameters.end) + 1;
18255
+ const end = Math.min(sourceFile.text.length, skipTrivia(sourceFile.text, typeParameters.end) + 1);
18255
18256
  return { pos, end };
18256
18257
  }
18257
18258
  function skipTypeChecking(sourceFile, options, host) {
@@ -30997,6 +30998,7 @@ ${lanes.join("\n")}
30997
30998
  switch (fourth) {
30998
30999
  case 63 /* EqualsToken */:
30999
31000
  case 31 /* GreaterThanToken */:
31001
+ case 43 /* SlashToken */:
31000
31002
  return false;
31001
31003
  default:
31002
31004
  return true;
@@ -55970,6 +55972,12 @@ ${lanes.join("\n")}
55970
55972
  thisParameter = getAnnotatedAccessorThisParameter(other);
55971
55973
  }
55972
55974
  }
55975
+ if (isInJSFile(declaration)) {
55976
+ const thisTag = getJSDocThisTag(declaration);
55977
+ if (thisTag && thisTag.typeExpression) {
55978
+ thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression));
55979
+ }
55980
+ }
55973
55981
  const classType = declaration.kind === 173 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0;
55974
55982
  const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
55975
55983
  if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) {
@@ -56083,7 +56091,11 @@ ${lanes.join("\n")}
56083
56091
  if (node.tags) {
56084
56092
  for (const tag of node.tags) {
56085
56093
  if (isJSDocOverloadTag(tag)) {
56086
- result.push(getSignatureFromDeclaration(tag.typeExpression));
56094
+ const jsDocSignature = tag.typeExpression;
56095
+ if (jsDocSignature.type === void 0) {
56096
+ reportImplicitAny(jsDocSignature, anyType);
56097
+ }
56098
+ result.push(getSignatureFromDeclaration(jsDocSignature));
56087
56099
  hasJSDocOverloads = true;
56088
56100
  }
56089
56101
  }
@@ -64032,6 +64044,11 @@ ${lanes.join("\n")}
64032
64044
  case 320 /* JSDocFunctionType */:
64033
64045
  error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
64034
64046
  return;
64047
+ case 326 /* JSDocSignature */:
64048
+ if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) {
64049
+ error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString);
64050
+ }
64051
+ return;
64035
64052
  case 259 /* FunctionDeclaration */:
64036
64053
  case 171 /* MethodDeclaration */:
64037
64054
  case 170 /* MethodSignature */:
@@ -67119,7 +67136,7 @@ ${lanes.join("\n")}
67119
67136
  }
67120
67137
  }
67121
67138
  function getTypeOfSymbolAtLocation(symbol, location) {
67122
- symbol = symbol.exportSymbol || symbol;
67139
+ symbol = getExportSymbolOfValueSymbolIfExported(symbol);
67123
67140
  if (location.kind === 79 /* Identifier */ || location.kind === 80 /* PrivateIdentifier */) {
67124
67141
  if (isRightSideOfQualifiedNameOrPropertyAccess(location)) {
67125
67142
  location = location.parent;
@@ -81310,7 +81327,7 @@ ${lanes.join("\n")}
81310
81327
  }
81311
81328
  return node.parent.kind === 180 /* TypeReference */;
81312
81329
  }
81313
- function isHeritageClauseElementIdentifier(node) {
81330
+ function isInNameOfExpressionWithTypeArguments(node) {
81314
81331
  while (node.parent.kind === 208 /* PropertyAccessExpression */) {
81315
81332
  node = node.parent;
81316
81333
  }
@@ -81420,10 +81437,10 @@ ${lanes.join("\n")}
81420
81437
  while (isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(name)) {
81421
81438
  name = name.parent;
81422
81439
  }
81423
- if (isHeritageClauseElementIdentifier(name)) {
81440
+ if (isInNameOfExpressionWithTypeArguments(name)) {
81424
81441
  let meaning = 0 /* None */;
81425
81442
  if (name.parent.kind === 230 /* ExpressionWithTypeArguments */) {
81426
- meaning = 788968 /* Type */;
81443
+ meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */;
81427
81444
  if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) {
81428
81445
  meaning |= 111551 /* Value */;
81429
81446
  }
@@ -126502,7 +126519,7 @@ ${lanes.join("\n")}
126502
126519
  };
126503
126520
  }
126504
126521
  function moduleResolutionUsesNodeModules(moduleResolution) {
126505
- return moduleResolution === 2 /* Node10 */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */;
126522
+ return moduleResolution === 2 /* Node10 */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */;
126506
126523
  }
126507
126524
  function makeImportIfNecessary(defaultImport, namedImports, moduleSpecifier, quotePreference) {
126508
126525
  return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImports, moduleSpecifier, quotePreference) : void 0;
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.0";
38
- version = `${versionMajorMinor}.0-dev.20230131`;
38
+ version = `${versionMajorMinor}.0-dev.20230201`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -8722,6 +8722,7 @@ ${lanes.join("\n")}
8722
8722
  new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, 1 /* Error */, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),
8723
8723
  _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, 1 /* Error */, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),
8724
8724
  Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, 1 /* Error */, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),
8725
+ This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: diag(7012, 1 /* Error */, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."),
8725
8726
  Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, 1 /* Error */, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),
8726
8727
  Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, 1 /* Error */, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),
8727
8728
  Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, 1 /* Error */, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."),
@@ -18251,7 +18252,7 @@ ${lanes.join("\n")}
18251
18252
  }
18252
18253
  function rangeOfTypeParameters(sourceFile, typeParameters) {
18253
18254
  const pos = typeParameters.pos - 1;
18254
- const end = skipTrivia(sourceFile.text, typeParameters.end) + 1;
18255
+ const end = Math.min(sourceFile.text.length, skipTrivia(sourceFile.text, typeParameters.end) + 1);
18255
18256
  return { pos, end };
18256
18257
  }
18257
18258
  function skipTypeChecking(sourceFile, options, host) {
@@ -30997,6 +30998,7 @@ ${lanes.join("\n")}
30997
30998
  switch (fourth) {
30998
30999
  case 63 /* EqualsToken */:
30999
31000
  case 31 /* GreaterThanToken */:
31001
+ case 43 /* SlashToken */:
31000
31002
  return false;
31001
31003
  default:
31002
31004
  return true;
@@ -55970,6 +55972,12 @@ ${lanes.join("\n")}
55970
55972
  thisParameter = getAnnotatedAccessorThisParameter(other);
55971
55973
  }
55972
55974
  }
55975
+ if (isInJSFile(declaration)) {
55976
+ const thisTag = getJSDocThisTag(declaration);
55977
+ if (thisTag && thisTag.typeExpression) {
55978
+ thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression));
55979
+ }
55980
+ }
55973
55981
  const classType = declaration.kind === 173 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)) : void 0;
55974
55982
  const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
55975
55983
  if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) {
@@ -56083,7 +56091,11 @@ ${lanes.join("\n")}
56083
56091
  if (node.tags) {
56084
56092
  for (const tag of node.tags) {
56085
56093
  if (isJSDocOverloadTag(tag)) {
56086
- result.push(getSignatureFromDeclaration(tag.typeExpression));
56094
+ const jsDocSignature = tag.typeExpression;
56095
+ if (jsDocSignature.type === void 0) {
56096
+ reportImplicitAny(jsDocSignature, anyType);
56097
+ }
56098
+ result.push(getSignatureFromDeclaration(jsDocSignature));
56087
56099
  hasJSDocOverloads = true;
56088
56100
  }
56089
56101
  }
@@ -64032,6 +64044,11 @@ ${lanes.join("\n")}
64032
64044
  case 320 /* JSDocFunctionType */:
64033
64045
  error(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
64034
64046
  return;
64047
+ case 326 /* JSDocSignature */:
64048
+ if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) {
64049
+ error(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString);
64050
+ }
64051
+ return;
64035
64052
  case 259 /* FunctionDeclaration */:
64036
64053
  case 171 /* MethodDeclaration */:
64037
64054
  case 170 /* MethodSignature */:
@@ -67119,7 +67136,7 @@ ${lanes.join("\n")}
67119
67136
  }
67120
67137
  }
67121
67138
  function getTypeOfSymbolAtLocation(symbol, location) {
67122
- symbol = symbol.exportSymbol || symbol;
67139
+ symbol = getExportSymbolOfValueSymbolIfExported(symbol);
67123
67140
  if (location.kind === 79 /* Identifier */ || location.kind === 80 /* PrivateIdentifier */) {
67124
67141
  if (isRightSideOfQualifiedNameOrPropertyAccess(location)) {
67125
67142
  location = location.parent;
@@ -81310,7 +81327,7 @@ ${lanes.join("\n")}
81310
81327
  }
81311
81328
  return node.parent.kind === 180 /* TypeReference */;
81312
81329
  }
81313
- function isHeritageClauseElementIdentifier(node) {
81330
+ function isInNameOfExpressionWithTypeArguments(node) {
81314
81331
  while (node.parent.kind === 208 /* PropertyAccessExpression */) {
81315
81332
  node = node.parent;
81316
81333
  }
@@ -81420,10 +81437,10 @@ ${lanes.join("\n")}
81420
81437
  while (isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(name)) {
81421
81438
  name = name.parent;
81422
81439
  }
81423
- if (isHeritageClauseElementIdentifier(name)) {
81440
+ if (isInNameOfExpressionWithTypeArguments(name)) {
81424
81441
  let meaning = 0 /* None */;
81425
81442
  if (name.parent.kind === 230 /* ExpressionWithTypeArguments */) {
81426
- meaning = 788968 /* Type */;
81443
+ meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */;
81427
81444
  if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) {
81428
81445
  meaning |= 111551 /* Value */;
81429
81446
  }
@@ -126516,7 +126533,7 @@ ${lanes.join("\n")}
126516
126533
  };
126517
126534
  }
126518
126535
  function moduleResolutionUsesNodeModules(moduleResolution) {
126519
- return moduleResolution === 2 /* Node10 */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */;
126536
+ return moduleResolution === 2 /* Node10 */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */;
126520
126537
  }
126521
126538
  function makeImportIfNecessary(defaultImport, namedImports, moduleSpecifier, quotePreference) {
126522
126539
  return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImports, moduleSpecifier, quotePreference) : void 0;
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.0";
57
- var version = `${versionMajorMinor}.0-dev.20230131`;
57
+ var version = `${versionMajorMinor}.0-dev.20230201`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -6843,6 +6843,7 @@ var Diagnostics = {
6843
6843
  new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, 1 /* Error */, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),
6844
6844
  _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, 1 /* Error */, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),
6845
6845
  Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, 1 /* Error */, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),
6846
+ This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: diag(7012, 1 /* Error */, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."),
6846
6847
  Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, 1 /* Error */, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),
6847
6848
  Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, 1 /* Error */, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),
6848
6849
  Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, 1 /* Error */, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."),
@@ -21810,6 +21811,7 @@ var Parser;
21810
21811
  switch (fourth) {
21811
21812
  case 63 /* EqualsToken */:
21812
21813
  case 31 /* GreaterThanToken */:
21814
+ case 43 /* SlashToken */:
21813
21815
  return false;
21814
21816
  default:
21815
21817
  return true;
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.0.0-dev.20230131",
5
+ "version": "5.0.0-dev.20230201",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [