typescript 6.0.0-dev.20260109 → 6.0.0-dev.20260110

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 = "6.0";
21
- var version = `${versionMajorMinor}.0-dev.20260109`;
21
+ var version = `${versionMajorMinor}.0-dev.20260110`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -79782,7 +79782,6 @@ function createTypeChecker(host) {
79782
79782
  }
79783
79783
  }
79784
79784
  checkNullishCoalesceOperandLeft(node);
79785
- checkNullishCoalesceOperandRight(node);
79786
79785
  }
79787
79786
  function checkNullishCoalesceOperandLeft(node) {
79788
79787
  const leftTarget = skipOuterExpressions(node.left, 63 /* All */);
@@ -79795,21 +79794,6 @@ function createTypeChecker(host) {
79795
79794
  }
79796
79795
  }
79797
79796
  }
79798
- function checkNullishCoalesceOperandRight(node) {
79799
- const rightTarget = skipOuterExpressions(node.right, 63 /* All */);
79800
- const nullishSemantics = getSyntacticNullishnessSemantics(rightTarget);
79801
- if (isNotWithinNullishCoalesceExpression(node)) {
79802
- return;
79803
- }
79804
- if (nullishSemantics === 1 /* Always */) {
79805
- error(rightTarget, Diagnostics.This_expression_is_always_nullish);
79806
- } else if (nullishSemantics === 2 /* Never */) {
79807
- error(rightTarget, Diagnostics.This_expression_is_never_nullish);
79808
- }
79809
- }
79810
- function isNotWithinNullishCoalesceExpression(node) {
79811
- return !isBinaryExpression(node.parent) || node.parent.operatorToken.kind !== 61 /* QuestionQuestionToken */;
79812
- }
79813
79797
  function getSyntacticNullishnessSemantics(node) {
79814
79798
  node = skipOuterExpressions(node);
79815
79799
  switch (node.kind) {
@@ -79825,15 +79809,16 @@ function createTypeChecker(host) {
79825
79809
  return 3 /* Sometimes */;
79826
79810
  case 227 /* BinaryExpression */:
79827
79811
  switch (node.operatorToken.kind) {
79828
- case 64 /* EqualsToken */:
79829
- case 61 /* QuestionQuestionToken */:
79830
- case 78 /* QuestionQuestionEqualsToken */:
79831
79812
  case 57 /* BarBarToken */:
79832
79813
  case 76 /* BarBarEqualsToken */:
79833
79814
  case 56 /* AmpersandAmpersandToken */:
79834
79815
  case 77 /* AmpersandAmpersandEqualsToken */:
79835
79816
  return 3 /* Sometimes */;
79817
+ // For these operator kinds, the right operand is effectively controlling
79836
79818
  case 28 /* CommaToken */:
79819
+ case 64 /* EqualsToken */:
79820
+ case 61 /* QuestionQuestionToken */:
79821
+ case 78 /* QuestionQuestionEqualsToken */:
79837
79822
  return getSyntacticNullishnessSemantics(node.right);
79838
79823
  }
79839
79824
  return 2 /* Never */;
package/lib/typescript.js CHANGED
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
2285
2285
 
2286
2286
  // src/compiler/corePublic.ts
2287
2287
  var versionMajorMinor = "6.0";
2288
- var version = `${versionMajorMinor}.0-dev.20260109`;
2288
+ var version = `${versionMajorMinor}.0-dev.20260110`;
2289
2289
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2290
2290
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2291
2291
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -84410,7 +84410,6 @@ function createTypeChecker(host) {
84410
84410
  }
84411
84411
  }
84412
84412
  checkNullishCoalesceOperandLeft(node);
84413
- checkNullishCoalesceOperandRight(node);
84414
84413
  }
84415
84414
  function checkNullishCoalesceOperandLeft(node) {
84416
84415
  const leftTarget = skipOuterExpressions(node.left, 63 /* All */);
@@ -84423,21 +84422,6 @@ function createTypeChecker(host) {
84423
84422
  }
84424
84423
  }
84425
84424
  }
84426
- function checkNullishCoalesceOperandRight(node) {
84427
- const rightTarget = skipOuterExpressions(node.right, 63 /* All */);
84428
- const nullishSemantics = getSyntacticNullishnessSemantics(rightTarget);
84429
- if (isNotWithinNullishCoalesceExpression(node)) {
84430
- return;
84431
- }
84432
- if (nullishSemantics === 1 /* Always */) {
84433
- error2(rightTarget, Diagnostics.This_expression_is_always_nullish);
84434
- } else if (nullishSemantics === 2 /* Never */) {
84435
- error2(rightTarget, Diagnostics.This_expression_is_never_nullish);
84436
- }
84437
- }
84438
- function isNotWithinNullishCoalesceExpression(node) {
84439
- return !isBinaryExpression(node.parent) || node.parent.operatorToken.kind !== 61 /* QuestionQuestionToken */;
84440
- }
84441
84425
  function getSyntacticNullishnessSemantics(node) {
84442
84426
  node = skipOuterExpressions(node);
84443
84427
  switch (node.kind) {
@@ -84453,15 +84437,16 @@ function createTypeChecker(host) {
84453
84437
  return 3 /* Sometimes */;
84454
84438
  case 227 /* BinaryExpression */:
84455
84439
  switch (node.operatorToken.kind) {
84456
- case 64 /* EqualsToken */:
84457
- case 61 /* QuestionQuestionToken */:
84458
- case 78 /* QuestionQuestionEqualsToken */:
84459
84440
  case 57 /* BarBarToken */:
84460
84441
  case 76 /* BarBarEqualsToken */:
84461
84442
  case 56 /* AmpersandAmpersandToken */:
84462
84443
  case 77 /* AmpersandAmpersandEqualsToken */:
84463
84444
  return 3 /* Sometimes */;
84445
+ // For these operator kinds, the right operand is effectively controlling
84464
84446
  case 28 /* CommaToken */:
84447
+ case 64 /* EqualsToken */:
84448
+ case 61 /* QuestionQuestionToken */:
84449
+ case 78 /* QuestionQuestionEqualsToken */:
84465
84450
  return getSyntacticNullishnessSemantics(node.right);
84466
84451
  }
84467
84452
  return 2 /* Never */;
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": "6.0.0-dev.20260109",
5
+ "version": "6.0.0-dev.20260110",
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": "632479f28de03492b9a47849a6808cf5119f1a14"
118
+ "gitHead": "f5ccf4345d6ac01f47be84db99fde50b98accbb5"
119
119
  }