typescript 5.4.0-dev.20231207 → 5.4.0-dev.20231208

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.4";
21
- var version = `${versionMajorMinor}.0-dev.20231207`;
21
+ var version = `${versionMajorMinor}.0-dev.20231208`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -18839,8 +18839,10 @@ function createNodeFactory(flags, baseFactory2) {
18839
18839
  return update(updated, original);
18840
18840
  }
18841
18841
  function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
18842
+ const text = typeof value === "number" ? value + "" : value;
18843
+ Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
18842
18844
  const node = createBaseDeclaration(9 /* NumericLiteral */);
18843
- node.text = typeof value === "number" ? value + "" : value;
18845
+ node.text = text;
18844
18846
  node.numericLiteralFlags = numericLiteralFlags;
18845
18847
  if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
18846
18848
  node.transformFlags |= 1024 /* ContainsES2015 */;
@@ -49567,7 +49569,7 @@ function createTypeChecker(host) {
49567
49569
  return factory.createStringLiteral(name, !!singleQuote);
49568
49570
  }
49569
49571
  if (isNumericLiteralName(name) && startsWith(name, "-")) {
49570
- return factory.createComputedPropertyName(factory.createNumericLiteral(+name));
49572
+ return factory.createComputedPropertyName(factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-name)));
49571
49573
  }
49572
49574
  return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
49573
49575
  }
@@ -53633,11 +53635,10 @@ function createTypeChecker(host) {
53633
53635
  const baseTypes = getBaseTypes(source);
53634
53636
  if (baseTypes.length) {
53635
53637
  if (source.symbol && members === getMembersOfSymbol(source.symbol)) {
53636
- const symbolTable = createSymbolTable();
53637
- for (const symbol of members.values()) {
53638
- if (!(symbol.flags & 262144 /* TypeParameter */)) {
53639
- symbolTable.set(symbol.escapedName, symbol);
53640
- }
53638
+ const symbolTable = createSymbolTable(source.declaredProperties);
53639
+ const sourceIndex = getIndexSymbol(source.symbol);
53640
+ if (sourceIndex) {
53641
+ symbolTable.set("__index" /* Index */, sourceIndex);
53641
53642
  }
53642
53643
  members = symbolTable;
53643
53644
  }
@@ -82648,7 +82649,7 @@ function createTypeChecker(host) {
82648
82649
  if (enumResult)
82649
82650
  return enumResult;
82650
82651
  const literalValue = type.value;
82651
- return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "number" ? factory.createNumericLiteral(literalValue) : factory.createStringLiteral(literalValue);
82652
+ return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "string" ? factory.createStringLiteral(literalValue) : literalValue < 0 ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-literalValue)) : factory.createNumericLiteral(literalValue);
82652
82653
  }
82653
82654
  function createLiteralConstValue(node, tracker) {
82654
82655
  const type = getTypeOfSymbol(getSymbolOfDeclaration(node));
@@ -89077,7 +89078,7 @@ function transformTypeScript(context) {
89077
89078
  function transformEnumMemberDeclarationValue(member) {
89078
89079
  const value = resolver.getConstantValue(member);
89079
89080
  if (value !== void 0) {
89080
- return typeof value === "string" ? factory2.createStringLiteral(value) : factory2.createNumericLiteral(value);
89081
+ return typeof value === "string" ? factory2.createStringLiteral(value) : value < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-value)) : factory2.createNumericLiteral(value);
89081
89082
  } else {
89082
89083
  enableSubstitutionForNonQualifiedEnumMembers();
89083
89084
  if (member.initializer) {
@@ -89607,7 +89608,7 @@ function transformTypeScript(context) {
89607
89608
  const constantValue = tryGetConstEnumValue(node);
89608
89609
  if (constantValue !== void 0) {
89609
89610
  setConstantValue(node, constantValue);
89610
- const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue);
89611
+ const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-constantValue)) : factory2.createNumericLiteral(constantValue);
89611
89612
  if (!compilerOptions.removeComments) {
89612
89613
  const originalNode = getOriginalNode(node, isAccessExpression);
89613
89614
  addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `);
@@ -103397,7 +103398,7 @@ function transformGenerators(context) {
103397
103398
  if (labelExpressions === void 0) {
103398
103399
  labelExpressions = [];
103399
103400
  }
103400
- const expression = factory2.createNumericLiteral(-1);
103401
+ const expression = factory2.createNumericLiteral(Number.MAX_SAFE_INTEGER);
103401
103402
  if (labelExpressions[label] === void 0) {
103402
103403
  labelExpressions[label] = [expression];
103403
103404
  } else {
@@ -109272,7 +109273,8 @@ function transformDeclarations(context) {
109272
109273
  if (shouldStripInternal(m))
109273
109274
  return;
109274
109275
  const constValue = resolver.getConstantValue(m);
109275
- return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m);
109276
+ const newInitializer = constValue === void 0 ? void 0 : typeof constValue === "string" ? factory2.createStringLiteral(constValue) : constValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-constValue)) : factory2.createNumericLiteral(constValue);
109277
+ return preserveJsDoc(factory2.updateEnumMember(m, m.name, newInitializer), m);
109276
109278
  }))
109277
109279
  ));
109278
109280
  }
@@ -111162,6 +111164,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
111162
111164
  );
111163
111165
  if (hint === 3 /* MappedTypeParameter */)
111164
111166
  return emitMappedTypeParameter(cast(node, isTypeParameterDeclaration));
111167
+ if (hint === 7 /* ImportTypeNodeAttributes */)
111168
+ return emitImportTypeNodeAttributes(cast(node, isImportAttributes));
111165
111169
  if (hint === 5 /* EmbeddedStatement */) {
111166
111170
  Debug.assertNode(node, isEmptyStatement);
111167
111171
  return emitEmptyStatement(
@@ -112138,15 +112142,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
112138
112142
  if (node.attributes) {
112139
112143
  writePunctuation(",");
112140
112144
  writeSpace();
112141
- writePunctuation("{");
112142
- writeSpace();
112143
- writeKeyword(node.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with");
112144
- writePunctuation(":");
112145
- writeSpace();
112146
- const elements = node.attributes.elements;
112147
- emitList(node.attributes, elements, 526226 /* ImportAttributes */);
112148
- writeSpace();
112149
- writePunctuation("}");
112145
+ pipelineEmit(7 /* ImportTypeNodeAttributes */, node.attributes);
112150
112146
  }
112151
112147
  writePunctuation(")");
112152
112148
  if (node.qualifier) {
@@ -113208,6 +113204,17 @@ function createPrinter(printerOptions = {}, handlers = {}) {
113208
113204
  }
113209
113205
  writeTrailingSemicolon();
113210
113206
  }
113207
+ function emitImportTypeNodeAttributes(node) {
113208
+ writePunctuation("{");
113209
+ writeSpace();
113210
+ writeKeyword(node.token === 132 /* AssertKeyword */ ? "assert" : "with");
113211
+ writePunctuation(":");
113212
+ writeSpace();
113213
+ const elements = node.elements;
113214
+ emitList(node, elements, 526226 /* ImportAttributes */);
113215
+ writeSpace();
113216
+ writePunctuation("}");
113217
+ }
113211
113218
  function emitImportAttributes(node) {
113212
113219
  emitTokenWithComment(node.token, node.pos, writeKeyword, node);
113213
113220
  writeSpace();
package/lib/tsserver.js CHANGED
@@ -2334,7 +2334,7 @@ module.exports = __toCommonJS(server_exports);
2334
2334
 
2335
2335
  // src/compiler/corePublic.ts
2336
2336
  var versionMajorMinor = "5.4";
2337
- var version = `${versionMajorMinor}.0-dev.20231207`;
2337
+ var version = `${versionMajorMinor}.0-dev.20231208`;
2338
2338
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2339
2339
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2340
2340
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -7291,6 +7291,7 @@ var EmitHint = /* @__PURE__ */ ((EmitHint6) => {
7291
7291
  EmitHint6[EmitHint6["Unspecified"] = 4] = "Unspecified";
7292
7292
  EmitHint6[EmitHint6["EmbeddedStatement"] = 5] = "EmbeddedStatement";
7293
7293
  EmitHint6[EmitHint6["JsxAttributeValue"] = 6] = "JsxAttributeValue";
7294
+ EmitHint6[EmitHint6["ImportTypeNodeAttributes"] = 7] = "ImportTypeNodeAttributes";
7294
7295
  return EmitHint6;
7295
7296
  })(EmitHint || {});
7296
7297
  var OuterExpressionKinds = /* @__PURE__ */ ((OuterExpressionKinds2) => {
@@ -23072,8 +23073,10 @@ function createNodeFactory(flags, baseFactory2) {
23072
23073
  return update(updated, original);
23073
23074
  }
23074
23075
  function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
23076
+ const text = typeof value === "number" ? value + "" : value;
23077
+ Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
23075
23078
  const node = createBaseDeclaration(9 /* NumericLiteral */);
23076
- node.text = typeof value === "number" ? value + "" : value;
23079
+ node.text = text;
23077
23080
  node.numericLiteralFlags = numericLiteralFlags;
23078
23081
  if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
23079
23082
  node.transformFlags |= 1024 /* ContainsES2015 */;
@@ -54296,7 +54299,7 @@ function createTypeChecker(host) {
54296
54299
  return factory.createStringLiteral(name, !!singleQuote);
54297
54300
  }
54298
54301
  if (isNumericLiteralName(name) && startsWith(name, "-")) {
54299
- return factory.createComputedPropertyName(factory.createNumericLiteral(+name));
54302
+ return factory.createComputedPropertyName(factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-name)));
54300
54303
  }
54301
54304
  return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
54302
54305
  }
@@ -58362,11 +58365,10 @@ function createTypeChecker(host) {
58362
58365
  const baseTypes = getBaseTypes(source);
58363
58366
  if (baseTypes.length) {
58364
58367
  if (source.symbol && members === getMembersOfSymbol(source.symbol)) {
58365
- const symbolTable = createSymbolTable();
58366
- for (const symbol of members.values()) {
58367
- if (!(symbol.flags & 262144 /* TypeParameter */)) {
58368
- symbolTable.set(symbol.escapedName, symbol);
58369
- }
58368
+ const symbolTable = createSymbolTable(source.declaredProperties);
58369
+ const sourceIndex = getIndexSymbol(source.symbol);
58370
+ if (sourceIndex) {
58371
+ symbolTable.set("__index" /* Index */, sourceIndex);
58370
58372
  }
58371
58373
  members = symbolTable;
58372
58374
  }
@@ -87377,7 +87379,7 @@ function createTypeChecker(host) {
87377
87379
  if (enumResult)
87378
87380
  return enumResult;
87379
87381
  const literalValue = type.value;
87380
- return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "number" ? factory.createNumericLiteral(literalValue) : factory.createStringLiteral(literalValue);
87382
+ return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "string" ? factory.createStringLiteral(literalValue) : literalValue < 0 ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-literalValue)) : factory.createNumericLiteral(literalValue);
87381
87383
  }
87382
87384
  function createLiteralConstValue(node, tracker) {
87383
87385
  const type = getTypeOfSymbol(getSymbolOfDeclaration(node));
@@ -93977,7 +93979,7 @@ function transformTypeScript(context) {
93977
93979
  function transformEnumMemberDeclarationValue(member) {
93978
93980
  const value = resolver.getConstantValue(member);
93979
93981
  if (value !== void 0) {
93980
- return typeof value === "string" ? factory2.createStringLiteral(value) : factory2.createNumericLiteral(value);
93982
+ return typeof value === "string" ? factory2.createStringLiteral(value) : value < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-value)) : factory2.createNumericLiteral(value);
93981
93983
  } else {
93982
93984
  enableSubstitutionForNonQualifiedEnumMembers();
93983
93985
  if (member.initializer) {
@@ -94507,7 +94509,7 @@ function transformTypeScript(context) {
94507
94509
  const constantValue = tryGetConstEnumValue(node);
94508
94510
  if (constantValue !== void 0) {
94509
94511
  setConstantValue(node, constantValue);
94510
- const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue);
94512
+ const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-constantValue)) : factory2.createNumericLiteral(constantValue);
94511
94513
  if (!compilerOptions.removeComments) {
94512
94514
  const originalNode = getOriginalNode(node, isAccessExpression);
94513
94515
  addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `);
@@ -108297,7 +108299,7 @@ function transformGenerators(context) {
108297
108299
  if (labelExpressions === void 0) {
108298
108300
  labelExpressions = [];
108299
108301
  }
108300
- const expression = factory2.createNumericLiteral(-1);
108302
+ const expression = factory2.createNumericLiteral(Number.MAX_SAFE_INTEGER);
108301
108303
  if (labelExpressions[label] === void 0) {
108302
108304
  labelExpressions[label] = [expression];
108303
108305
  } else {
@@ -114172,7 +114174,8 @@ function transformDeclarations(context) {
114172
114174
  if (shouldStripInternal(m))
114173
114175
  return;
114174
114176
  const constValue = resolver.getConstantValue(m);
114175
- return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m);
114177
+ const newInitializer = constValue === void 0 ? void 0 : typeof constValue === "string" ? factory2.createStringLiteral(constValue) : constValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-constValue)) : factory2.createNumericLiteral(constValue);
114178
+ return preserveJsDoc(factory2.updateEnumMember(m, m.name, newInitializer), m);
114176
114179
  }))
114177
114180
  ));
114178
114181
  }
@@ -116073,6 +116076,8 @@ function createPrinter(printerOptions = {}, handlers = {}) {
116073
116076
  );
116074
116077
  if (hint === 3 /* MappedTypeParameter */)
116075
116078
  return emitMappedTypeParameter(cast(node, isTypeParameterDeclaration));
116079
+ if (hint === 7 /* ImportTypeNodeAttributes */)
116080
+ return emitImportTypeNodeAttributes(cast(node, isImportAttributes));
116076
116081
  if (hint === 5 /* EmbeddedStatement */) {
116077
116082
  Debug.assertNode(node, isEmptyStatement);
116078
116083
  return emitEmptyStatement(
@@ -117049,15 +117054,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
117049
117054
  if (node.attributes) {
117050
117055
  writePunctuation(",");
117051
117056
  writeSpace();
117052
- writePunctuation("{");
117053
- writeSpace();
117054
- writeKeyword(node.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with");
117055
- writePunctuation(":");
117056
- writeSpace();
117057
- const elements = node.attributes.elements;
117058
- emitList(node.attributes, elements, 526226 /* ImportAttributes */);
117059
- writeSpace();
117060
- writePunctuation("}");
117057
+ pipelineEmit(7 /* ImportTypeNodeAttributes */, node.attributes);
117061
117058
  }
117062
117059
  writePunctuation(")");
117063
117060
  if (node.qualifier) {
@@ -118119,6 +118116,17 @@ function createPrinter(printerOptions = {}, handlers = {}) {
118119
118116
  }
118120
118117
  writeTrailingSemicolon();
118121
118118
  }
118119
+ function emitImportTypeNodeAttributes(node) {
118120
+ writePunctuation("{");
118121
+ writeSpace();
118122
+ writeKeyword(node.token === 132 /* AssertKeyword */ ? "assert" : "with");
118123
+ writePunctuation(":");
118124
+ writeSpace();
118125
+ const elements = node.elements;
118126
+ emitList(node, elements, 526226 /* ImportAttributes */);
118127
+ writeSpace();
118128
+ writePunctuation("}");
118129
+ }
118122
118130
  function emitImportAttributes(node) {
118123
118131
  emitTokenWithComment(node.token, node.pos, writeKeyword, node);
118124
118132
  writeSpace();
@@ -165954,9 +165962,8 @@ function provideInlayHints(context) {
165954
165962
  break;
165955
165963
  case 181 /* IndexSignature */:
165956
165964
  Debug.assertNode(node, isIndexSignatureDeclaration);
165957
- Debug.assertEqual(node.parameters.length, 1);
165958
165965
  parts.push({ text: "[" });
165959
- visitForDisplayParts(node.parameters[0]);
165966
+ visitDisplayPartList(node.parameters, ", ");
165960
165967
  parts.push({ text: "]" });
165961
165968
  if (node.type) {
165962
165969
  parts.push({ text: ": " });
@@ -7896,6 +7896,7 @@ declare namespace ts {
7896
7896
  Unspecified = 4,
7897
7897
  EmbeddedStatement = 5,
7898
7898
  JsxAttributeValue = 6,
7899
+ ImportTypeNodeAttributes = 7,
7899
7900
  }
7900
7901
  enum OuterExpressionKinds {
7901
7902
  Parentheses = 1,
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.4";
38
- version = `${versionMajorMinor}.0-dev.20231207`;
38
+ version = `${versionMajorMinor}.0-dev.20231208`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -5046,6 +5046,7 @@ ${lanes.join("\n")}
5046
5046
  EmitHint6[EmitHint6["Unspecified"] = 4] = "Unspecified";
5047
5047
  EmitHint6[EmitHint6["EmbeddedStatement"] = 5] = "EmbeddedStatement";
5048
5048
  EmitHint6[EmitHint6["JsxAttributeValue"] = 6] = "JsxAttributeValue";
5049
+ EmitHint6[EmitHint6["ImportTypeNodeAttributes"] = 7] = "ImportTypeNodeAttributes";
5049
5050
  return EmitHint6;
5050
5051
  })(EmitHint || {});
5051
5052
  OuterExpressionKinds = /* @__PURE__ */ ((OuterExpressionKinds2) => {
@@ -20880,8 +20881,10 @@ ${lanes.join("\n")}
20880
20881
  return update(updated, original);
20881
20882
  }
20882
20883
  function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
20884
+ const text = typeof value === "number" ? value + "" : value;
20885
+ Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
20883
20886
  const node = createBaseDeclaration(9 /* NumericLiteral */);
20884
- node.text = typeof value === "number" ? value + "" : value;
20887
+ node.text = text;
20885
20888
  node.numericLiteralFlags = numericLiteralFlags;
20886
20889
  if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
20887
20890
  node.transformFlags |= 1024 /* ContainsES2015 */;
@@ -52057,7 +52060,7 @@ ${lanes.join("\n")}
52057
52060
  return factory.createStringLiteral(name, !!singleQuote);
52058
52061
  }
52059
52062
  if (isNumericLiteralName(name) && startsWith(name, "-")) {
52060
- return factory.createComputedPropertyName(factory.createNumericLiteral(+name));
52063
+ return factory.createComputedPropertyName(factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-name)));
52061
52064
  }
52062
52065
  return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod);
52063
52066
  }
@@ -56123,11 +56126,10 @@ ${lanes.join("\n")}
56123
56126
  const baseTypes = getBaseTypes(source);
56124
56127
  if (baseTypes.length) {
56125
56128
  if (source.symbol && members === getMembersOfSymbol(source.symbol)) {
56126
- const symbolTable = createSymbolTable();
56127
- for (const symbol of members.values()) {
56128
- if (!(symbol.flags & 262144 /* TypeParameter */)) {
56129
- symbolTable.set(symbol.escapedName, symbol);
56130
- }
56129
+ const symbolTable = createSymbolTable(source.declaredProperties);
56130
+ const sourceIndex = getIndexSymbol(source.symbol);
56131
+ if (sourceIndex) {
56132
+ symbolTable.set("__index" /* Index */, sourceIndex);
56131
56133
  }
56132
56134
  members = symbolTable;
56133
56135
  }
@@ -85138,7 +85140,7 @@ ${lanes.join("\n")}
85138
85140
  if (enumResult)
85139
85141
  return enumResult;
85140
85142
  const literalValue = type.value;
85141
- return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "number" ? factory.createNumericLiteral(literalValue) : factory.createStringLiteral(literalValue);
85143
+ return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "string" ? factory.createStringLiteral(literalValue) : literalValue < 0 ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-literalValue)) : factory.createNumericLiteral(literalValue);
85142
85144
  }
85143
85145
  function createLiteralConstValue(node, tracker) {
85144
85146
  const type = getTypeOfSymbol(getSymbolOfDeclaration(node));
@@ -91918,7 +91920,7 @@ ${lanes.join("\n")}
91918
91920
  function transformEnumMemberDeclarationValue(member) {
91919
91921
  const value = resolver.getConstantValue(member);
91920
91922
  if (value !== void 0) {
91921
- return typeof value === "string" ? factory2.createStringLiteral(value) : factory2.createNumericLiteral(value);
91923
+ return typeof value === "string" ? factory2.createStringLiteral(value) : value < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-value)) : factory2.createNumericLiteral(value);
91922
91924
  } else {
91923
91925
  enableSubstitutionForNonQualifiedEnumMembers();
91924
91926
  if (member.initializer) {
@@ -92448,7 +92450,7 @@ ${lanes.join("\n")}
92448
92450
  const constantValue = tryGetConstEnumValue(node);
92449
92451
  if (constantValue !== void 0) {
92450
92452
  setConstantValue(node, constantValue);
92451
- const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue);
92453
+ const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-constantValue)) : factory2.createNumericLiteral(constantValue);
92452
92454
  if (!compilerOptions.removeComments) {
92453
92455
  const originalNode = getOriginalNode(node, isAccessExpression);
92454
92456
  addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `);
@@ -106331,7 +106333,7 @@ ${lanes.join("\n")}
106331
106333
  if (labelExpressions === void 0) {
106332
106334
  labelExpressions = [];
106333
106335
  }
106334
- const expression = factory2.createNumericLiteral(-1);
106336
+ const expression = factory2.createNumericLiteral(Number.MAX_SAFE_INTEGER);
106335
106337
  if (labelExpressions[label] === void 0) {
106336
106338
  labelExpressions[label] = [expression];
106337
106339
  } else {
@@ -112242,7 +112244,8 @@ ${lanes.join("\n")}
112242
112244
  if (shouldStripInternal(m))
112243
112245
  return;
112244
112246
  const constValue = resolver.getConstantValue(m);
112245
- return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m);
112247
+ const newInitializer = constValue === void 0 ? void 0 : typeof constValue === "string" ? factory2.createStringLiteral(constValue) : constValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(-constValue)) : factory2.createNumericLiteral(constValue);
112248
+ return preserveJsDoc(factory2.updateEnumMember(m, m.name, newInitializer), m);
112246
112249
  }))
112247
112250
  ));
112248
112251
  }
@@ -114110,6 +114113,8 @@ ${lanes.join("\n")}
114110
114113
  );
114111
114114
  if (hint === 3 /* MappedTypeParameter */)
114112
114115
  return emitMappedTypeParameter(cast(node, isTypeParameterDeclaration));
114116
+ if (hint === 7 /* ImportTypeNodeAttributes */)
114117
+ return emitImportTypeNodeAttributes(cast(node, isImportAttributes));
114113
114118
  if (hint === 5 /* EmbeddedStatement */) {
114114
114119
  Debug.assertNode(node, isEmptyStatement);
114115
114120
  return emitEmptyStatement(
@@ -115086,15 +115091,7 @@ ${lanes.join("\n")}
115086
115091
  if (node.attributes) {
115087
115092
  writePunctuation(",");
115088
115093
  writeSpace();
115089
- writePunctuation("{");
115090
- writeSpace();
115091
- writeKeyword(node.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with");
115092
- writePunctuation(":");
115093
- writeSpace();
115094
- const elements = node.attributes.elements;
115095
- emitList(node.attributes, elements, 526226 /* ImportAttributes */);
115096
- writeSpace();
115097
- writePunctuation("}");
115094
+ pipelineEmit(7 /* ImportTypeNodeAttributes */, node.attributes);
115098
115095
  }
115099
115096
  writePunctuation(")");
115100
115097
  if (node.qualifier) {
@@ -116156,6 +116153,17 @@ ${lanes.join("\n")}
116156
116153
  }
116157
116154
  writeTrailingSemicolon();
116158
116155
  }
116156
+ function emitImportTypeNodeAttributes(node) {
116157
+ writePunctuation("{");
116158
+ writeSpace();
116159
+ writeKeyword(node.token === 132 /* AssertKeyword */ ? "assert" : "with");
116160
+ writePunctuation(":");
116161
+ writeSpace();
116162
+ const elements = node.elements;
116163
+ emitList(node, elements, 526226 /* ImportAttributes */);
116164
+ writeSpace();
116165
+ writePunctuation("}");
116166
+ }
116159
116167
  function emitImportAttributes(node) {
116160
116168
  emitTokenWithComment(node.token, node.pos, writeKeyword, node);
116161
116169
  writeSpace();
@@ -165294,9 +165302,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
165294
165302
  break;
165295
165303
  case 181 /* IndexSignature */:
165296
165304
  Debug.assertNode(node, isIndexSignatureDeclaration);
165297
- Debug.assertEqual(node.parameters.length, 1);
165298
165305
  parts.push({ text: "[" });
165299
- visitForDisplayParts(node.parameters[0]);
165306
+ visitDisplayPartList(node.parameters, ", ");
165300
165307
  parts.push({ text: "]" });
165301
165308
  if (node.type) {
165302
165309
  parts.push({ text: ": " });
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.4";
57
- var version = `${versionMajorMinor}.0-dev.20231207`;
57
+ var version = `${versionMajorMinor}.0-dev.20231208`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -13054,8 +13054,10 @@ function createNodeFactory(flags, baseFactory2) {
13054
13054
  return update(updated, original);
13055
13055
  }
13056
13056
  function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) {
13057
+ const text = typeof value === "number" ? value + "" : value;
13058
+ Debug.assert(text.charCodeAt(0) !== 45 /* minus */, "Negative numbers should be created in combination with createPrefixUnaryExpression");
13057
13059
  const node = createBaseDeclaration(9 /* NumericLiteral */);
13058
- node.text = typeof value === "number" ? value + "" : value;
13060
+ node.text = text;
13059
13061
  node.numericLiteralFlags = numericLiteralFlags;
13060
13062
  if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */)
13061
13063
  node.transformFlags |= 1024 /* ContainsES2015 */;
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.4.0-dev.20231207",
5
+ "version": "5.4.0-dev.20231208",
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": "20c0f4052681cdbdba3357a50822915b6ef4c3d6"
117
+ "gitHead": "e3d234cfc8653d14e907ae84f918d5bd18546619"
118
118
  }