@typescript-deploys/pr-build 5.4.0-pr-56247-3 → 5.4.0-pr-56555-7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -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-insiders.20231207`;
21
+ var version = `${versionMajorMinor}.0-insiders.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 */;
@@ -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
  }
@@ -68801,7 +68802,7 @@ function createTypeChecker(host) {
68801
68802
  /*contextFlags*/
68802
68803
  void 0
68803
68804
  );
68804
- const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType);
68805
+ const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, (t) => isTupleLikeType(t) || isGenericMappedType(t) && !t.nameType && !!getHomomorphicTypeVariable(t.target || t));
68805
68806
  let hasOmittedExpression = false;
68806
68807
  for (let i = 0; i < elementCount; i++) {
68807
68808
  const e = elements[i];
@@ -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-insiders.20231207`;
2337
+ var version = `${versionMajorMinor}.0-insiders.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 */;
@@ -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
  }
@@ -73530,7 +73532,7 @@ function createTypeChecker(host) {
73530
73532
  /*contextFlags*/
73531
73533
  void 0
73532
73534
  );
73533
- const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType);
73535
+ const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, (t) => isTupleLikeType(t) || isGenericMappedType(t) && !t.nameType && !!getHomomorphicTypeVariable(t.target || t));
73534
73536
  let hasOmittedExpression = false;
73535
73537
  for (let i = 0; i < elementCount; i++) {
73536
73538
  const e = elements[i];
@@ -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();
@@ -167617,16 +167625,16 @@ function getRenameInfoForModule(node, sourceFile, moduleSymbol) {
167617
167625
  if (!moduleSourceFile)
167618
167626
  return void 0;
167619
167627
  const withoutIndex = endsWith(node.text, "/index") || endsWith(node.text, "/index.js") ? void 0 : tryRemoveSuffix(removeFileExtension(moduleSourceFile.fileName), "/index");
167620
- const name = withoutIndex === void 0 ? moduleSourceFile.fileName : withoutIndex;
167628
+ const fileName = withoutIndex === void 0 ? moduleSourceFile.fileName : withoutIndex;
167621
167629
  const kind = withoutIndex === void 0 ? "module" /* moduleElement */ : "directory" /* directory */;
167622
167630
  const indexAfterLastSlash = node.text.lastIndexOf("/") + 1;
167623
167631
  const triggerSpan = createTextSpan(node.getStart(sourceFile) + 1 + indexAfterLastSlash, node.text.length - indexAfterLastSlash);
167624
167632
  return {
167625
167633
  canRename: true,
167626
- fileToRename: name,
167634
+ fileToRename: fileName,
167627
167635
  kind,
167628
- displayName: name,
167629
- fullDisplayName: name,
167636
+ displayName: fileName,
167637
+ fullDisplayName: node.text,
167630
167638
  kindModifiers: "" /* none */,
167631
167639
  triggerSpan
167632
167640
  };
@@ -1087,6 +1087,7 @@ declare namespace ts {
1087
1087
  displayName: string;
1088
1088
  /**
1089
1089
  * Full display name of item to be renamed.
1090
+ * If item to be renamed is a file, then this is the original text of the module specifer
1090
1091
  */
1091
1092
  fullDisplayName: string;
1092
1093
  /**
@@ -7896,6 +7897,7 @@ declare namespace ts {
7896
7897
  Unspecified = 4,
7897
7898
  EmbeddedStatement = 5,
7898
7899
  JsxAttributeValue = 6,
7900
+ ImportTypeNodeAttributes = 7,
7899
7901
  }
7900
7902
  enum OuterExpressionKinds {
7901
7903
  Parentheses = 1,
@@ -11091,6 +11093,10 @@ declare namespace ts {
11091
11093
  */
11092
11094
  fileToRename?: string;
11093
11095
  displayName: string;
11096
+ /**
11097
+ * Full display name of item to be renamed.
11098
+ * If item to be renamed is a file, then this is the original text of the module specifer
11099
+ */
11094
11100
  fullDisplayName: string;
11095
11101
  kind: ScriptElementKind;
11096
11102
  kindModifiers: string;
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-insiders.20231207`;
38
+ version = `${versionMajorMinor}.0-insiders.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 */;
@@ -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
  }
@@ -71291,7 +71293,7 @@ ${lanes.join("\n")}
71291
71293
  /*contextFlags*/
71292
71294
  void 0
71293
71295
  );
71294
- const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType);
71296
+ const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, (t) => isTupleLikeType(t) || isGenericMappedType(t) && !t.nameType && !!getHomomorphicTypeVariable(t.target || t));
71295
71297
  let hasOmittedExpression = false;
71296
71298
  for (let i = 0; i < elementCount; i++) {
71297
71299
  const e = elements[i];
@@ -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();
@@ -167009,16 +167017,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
167009
167017
  if (!moduleSourceFile)
167010
167018
  return void 0;
167011
167019
  const withoutIndex = endsWith(node.text, "/index") || endsWith(node.text, "/index.js") ? void 0 : tryRemoveSuffix(removeFileExtension(moduleSourceFile.fileName), "/index");
167012
- const name = withoutIndex === void 0 ? moduleSourceFile.fileName : withoutIndex;
167020
+ const fileName = withoutIndex === void 0 ? moduleSourceFile.fileName : withoutIndex;
167013
167021
  const kind = withoutIndex === void 0 ? "module" /* moduleElement */ : "directory" /* directory */;
167014
167022
  const indexAfterLastSlash = node.text.lastIndexOf("/") + 1;
167015
167023
  const triggerSpan = createTextSpan(node.getStart(sourceFile) + 1 + indexAfterLastSlash, node.text.length - indexAfterLastSlash);
167016
167024
  return {
167017
167025
  canRename: true,
167018
- fileToRename: name,
167026
+ fileToRename: fileName,
167019
167027
  kind,
167020
- displayName: name,
167021
- fullDisplayName: name,
167028
+ displayName: fileName,
167029
+ fullDisplayName: node.text,
167022
167030
  kindModifiers: "" /* none */,
167023
167031
  triggerSpan
167024
167032
  };
@@ -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-insiders.20231207`;
57
+ var version = `${versionMajorMinor}.0-insiders.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-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.4.0-pr-56247-3",
5
+ "version": "5.4.0-pr-56555-7",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -115,5 +115,5 @@
115
115
  "node": "20.1.0",
116
116
  "npm": "8.19.4"
117
117
  },
118
- "gitHead": "df1d9661e3b6b609ada9836f51db4ec0e1c54394"
118
+ "gitHead": "64057cbfa7d3c28f0f6071d063db39f14b9dc16f"
119
119
  }