typescript 5.1.0-dev.20230421 → 5.1.0-dev.20230423

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.
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.1";
57
- var version = `${versionMajorMinor}.0-dev.20230421`;
57
+ var version = `${versionMajorMinor}.0-dev.20230423`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -2854,10 +2854,8 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => {
2854
2854
  SyntaxKind4[SyntaxKind4["NotEmittedStatement"] = 358] = "NotEmittedStatement";
2855
2855
  SyntaxKind4[SyntaxKind4["PartiallyEmittedExpression"] = 359] = "PartiallyEmittedExpression";
2856
2856
  SyntaxKind4[SyntaxKind4["CommaListExpression"] = 360] = "CommaListExpression";
2857
- SyntaxKind4[SyntaxKind4["MergeDeclarationMarker"] = 361] = "MergeDeclarationMarker";
2858
- SyntaxKind4[SyntaxKind4["EndOfDeclarationMarker"] = 362] = "EndOfDeclarationMarker";
2859
- SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 363] = "SyntheticReferenceExpression";
2860
- SyntaxKind4[SyntaxKind4["Count"] = 364] = "Count";
2857
+ SyntaxKind4[SyntaxKind4["SyntheticReferenceExpression"] = 361] = "SyntheticReferenceExpression";
2858
+ SyntaxKind4[SyntaxKind4["Count"] = 362] = "Count";
2861
2859
  SyntaxKind4[SyntaxKind4["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment";
2862
2860
  SyntaxKind4[SyntaxKind4["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment";
2863
2861
  SyntaxKind4[SyntaxKind4["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment";
@@ -3304,9 +3302,8 @@ var EmitFlags = /* @__PURE__ */ ((EmitFlags3) => {
3304
3302
  EmitFlags3[EmitFlags3["ReuseTempVariableScope"] = 1048576] = "ReuseTempVariableScope";
3305
3303
  EmitFlags3[EmitFlags3["CustomPrologue"] = 2097152] = "CustomPrologue";
3306
3304
  EmitFlags3[EmitFlags3["NoHoisting"] = 4194304] = "NoHoisting";
3307
- EmitFlags3[EmitFlags3["HasEndOfDeclarationMarker"] = 8388608] = "HasEndOfDeclarationMarker";
3308
- EmitFlags3[EmitFlags3["Iterator"] = 16777216] = "Iterator";
3309
- EmitFlags3[EmitFlags3["NoAsciiEscaping"] = 33554432] = "NoAsciiEscaping";
3305
+ EmitFlags3[EmitFlags3["Iterator"] = 8388608] = "Iterator";
3306
+ EmitFlags3[EmitFlags3["NoAsciiEscaping"] = 16777216] = "NoAsciiEscaping";
3310
3307
  return EmitFlags3;
3311
3308
  })(EmitFlags || {});
3312
3309
  var commentPragmas = {
@@ -7081,6 +7078,7 @@ var Diagnostics = {
7081
7078
  Use_Number_isNaN_in_all_conditions: diag(95175, 3 /* Message */, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."),
7082
7079
  Convert_typedef_to_TypeScript_type: diag(95176, 3 /* Message */, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."),
7083
7080
  Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."),
7081
+ Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"),
7084
7082
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
7085
7083
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
7086
7084
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -9906,7 +9904,7 @@ function isDeclarationStatementKind(kind) {
9906
9904
  return kind === 261 /* FunctionDeclaration */ || kind === 281 /* MissingDeclaration */ || kind === 262 /* ClassDeclaration */ || kind === 263 /* InterfaceDeclaration */ || kind === 264 /* TypeAliasDeclaration */ || kind === 265 /* EnumDeclaration */ || kind === 266 /* ModuleDeclaration */ || kind === 271 /* ImportDeclaration */ || kind === 270 /* ImportEqualsDeclaration */ || kind === 277 /* ExportDeclaration */ || kind === 276 /* ExportAssignment */ || kind === 269 /* NamespaceExportDeclaration */;
9907
9905
  }
9908
9906
  function isStatementKindButNotDeclarationKind(kind) {
9909
- return kind === 251 /* BreakStatement */ || kind === 250 /* ContinueStatement */ || kind === 258 /* DebuggerStatement */ || kind === 245 /* DoStatement */ || kind === 243 /* ExpressionStatement */ || kind === 241 /* EmptyStatement */ || kind === 248 /* ForInStatement */ || kind === 249 /* ForOfStatement */ || kind === 247 /* ForStatement */ || kind === 244 /* IfStatement */ || kind === 255 /* LabeledStatement */ || kind === 252 /* ReturnStatement */ || kind === 254 /* SwitchStatement */ || kind === 256 /* ThrowStatement */ || kind === 257 /* TryStatement */ || kind === 242 /* VariableStatement */ || kind === 246 /* WhileStatement */ || kind === 253 /* WithStatement */ || kind === 358 /* NotEmittedStatement */ || kind === 362 /* EndOfDeclarationMarker */ || kind === 361 /* MergeDeclarationMarker */;
9907
+ return kind === 251 /* BreakStatement */ || kind === 250 /* ContinueStatement */ || kind === 258 /* DebuggerStatement */ || kind === 245 /* DoStatement */ || kind === 243 /* ExpressionStatement */ || kind === 241 /* EmptyStatement */ || kind === 248 /* ForInStatement */ || kind === 249 /* ForOfStatement */ || kind === 247 /* ForStatement */ || kind === 244 /* IfStatement */ || kind === 255 /* LabeledStatement */ || kind === 252 /* ReturnStatement */ || kind === 254 /* SwitchStatement */ || kind === 256 /* ThrowStatement */ || kind === 257 /* TryStatement */ || kind === 242 /* VariableStatement */ || kind === 246 /* WhileStatement */ || kind === 253 /* WithStatement */ || kind === 358 /* NotEmittedStatement */;
9910
9908
  }
9911
9909
  function isDeclaration(node) {
9912
9910
  if (node.kind === 167 /* TypeParameter */) {
@@ -12747,8 +12745,6 @@ function createNodeFactory(flags, baseFactory2) {
12747
12745
  updatePartiallyEmittedExpression,
12748
12746
  createCommaListExpression,
12749
12747
  updateCommaListExpression,
12750
- createEndOfDeclarationMarker,
12751
- createMergeDeclarationMarker,
12752
12748
  createSyntheticReferenceExpression,
12753
12749
  updateSyntheticReferenceExpression,
12754
12750
  cloneNode,
@@ -15816,20 +15812,8 @@ function createNodeFactory(flags, baseFactory2) {
15816
15812
  function updateCommaListExpression(node, elements) {
15817
15813
  return node.elements !== elements ? update(createCommaListExpression(elements), node) : node;
15818
15814
  }
15819
- function createEndOfDeclarationMarker(original) {
15820
- const node = createBaseNode(362 /* EndOfDeclarationMarker */);
15821
- node.emitNode = {};
15822
- node.original = original;
15823
- return node;
15824
- }
15825
- function createMergeDeclarationMarker(original) {
15826
- const node = createBaseNode(361 /* MergeDeclarationMarker */);
15827
- node.emitNode = {};
15828
- node.original = original;
15829
- return node;
15830
- }
15831
15815
  function createSyntheticReferenceExpression(expression, thisArg) {
15832
- const node = createBaseNode(363 /* SyntheticReferenceExpression */);
15816
+ const node = createBaseNode(361 /* SyntheticReferenceExpression */);
15833
15817
  node.expression = expression;
15834
15818
  node.thisArg = thisArg;
15835
15819
  node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg);
@@ -16221,8 +16205,8 @@ function createNodeFactory(flags, baseFactory2) {
16221
16205
  function inlineExpressions(expressions) {
16222
16206
  return expressions.length > 10 ? createCommaListExpression(expressions) : reduceLeft(expressions, factory2.createComma);
16223
16207
  }
16224
- function getName(node, allowComments, allowSourceMaps, emitFlags = 0) {
16225
- const nodeName = getNameOfDeclaration(node);
16208
+ function getName(node, allowComments, allowSourceMaps, emitFlags = 0, ignoreAssignedName) {
16209
+ const nodeName = ignoreAssignedName ? node && getNonAssignedNameOfDeclaration(node) : getNameOfDeclaration(node);
16226
16210
  if (nodeName && isIdentifier(nodeName) && !isGeneratedIdentifier(nodeName)) {
16227
16211
  const name = setParent(setTextRange(cloneNode(nodeName), nodeName), nodeName.parent);
16228
16212
  emitFlags |= getEmitFlags(nodeName);
@@ -16239,8 +16223,8 @@ function createNodeFactory(flags, baseFactory2) {
16239
16223
  function getInternalName(node, allowComments, allowSourceMaps) {
16240
16224
  return getName(node, allowComments, allowSourceMaps, 32768 /* LocalName */ | 65536 /* InternalName */);
16241
16225
  }
16242
- function getLocalName(node, allowComments, allowSourceMaps) {
16243
- return getName(node, allowComments, allowSourceMaps, 32768 /* LocalName */);
16226
+ function getLocalName(node, allowComments, allowSourceMaps, ignoreAssignedName) {
16227
+ return getName(node, allowComments, allowSourceMaps, 32768 /* LocalName */, ignoreAssignedName);
16244
16228
  }
16245
16229
  function getExportName(node, allowComments, allowSourceMaps) {
16246
16230
  return getName(node, allowComments, allowSourceMaps, 16384 /* ExportName */);
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.1.0-dev.20230421",
5
+ "version": "5.1.0-dev.20230423",
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": "14.21.1",
116
116
  "npm": "8.19.3"
117
117
  },
118
- "gitHead": "09b1c55f83a4171d2f440b04f2cf9e9cb4e7adab"
118
+ "gitHead": "8749fb5c0a4a0e3407eb099322c85b850cc642aa"
119
119
  }