typescript 5.6.0-dev.20240806 → 5.6.0-dev.20240807

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.6";
21
- var version = `${versionMajorMinor}.0-dev.20240806`;
21
+ var version = `${versionMajorMinor}.0-dev.20240807`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -15313,7 +15313,7 @@ function skipTypeParentheses(node) {
15313
15313
  return node;
15314
15314
  }
15315
15315
  function skipParentheses(node, excludeJSDocTypeAssertions) {
15316
- const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | 16 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */;
15316
+ const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | -2147483648 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */;
15317
15317
  return skipOuterExpressions(node, flags);
15318
15318
  }
15319
15319
  function isDeleteTarget(node) {
@@ -23897,6 +23897,8 @@ function createNodeFactory(flags, baseFactory2) {
23897
23897
  return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
23898
23898
  case 235 /* NonNullExpression */:
23899
23899
  return updateNonNullExpression(outerExpression, expression);
23900
+ case 233 /* ExpressionWithTypeArguments */:
23901
+ return updateExpressionWithTypeArguments(outerExpression, expression, outerExpression.typeArguments);
23900
23902
  case 354 /* PartiallyEmittedExpression */:
23901
23903
  return updatePartiallyEmittedExpression(outerExpression, expression);
23902
23904
  }
@@ -23904,7 +23906,7 @@ function createNodeFactory(flags, baseFactory2) {
23904
23906
  function isIgnorableParen(node) {
23905
23907
  return isParenthesizedExpression(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node));
23906
23908
  }
23907
- function restoreOuterExpressions(outerExpression, innerExpression, kinds = 15 /* All */) {
23909
+ function restoreOuterExpressions(outerExpression, innerExpression, kinds = 31 /* All */) {
23908
23910
  if (outerExpression && isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression)) {
23909
23911
  return updateOuterExpression(
23910
23912
  outerExpression,
@@ -23950,7 +23952,7 @@ function createNodeFactory(flags, baseFactory2) {
23950
23952
  }
23951
23953
  }
23952
23954
  function createCallBinding(expression, recordTempVariable, languageVersion, cacheIdentifiers = false) {
23953
- const callee = skipOuterExpressions(expression, 15 /* All */);
23955
+ const callee = skipOuterExpressions(expression, 31 /* All */);
23954
23956
  let thisArg;
23955
23957
  let target;
23956
23958
  if (isSuperProperty(callee)) {
@@ -26781,18 +26783,19 @@ function getJSDocTypeAssertionType(node) {
26781
26783
  Debug.assertIsDefined(type);
26782
26784
  return type;
26783
26785
  }
26784
- function isOuterExpression(node, kinds = 15 /* All */) {
26786
+ function isOuterExpression(node, kinds = 31 /* All */) {
26785
26787
  switch (node.kind) {
26786
26788
  case 217 /* ParenthesizedExpression */:
26787
- if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) {
26789
+ if (kinds & -2147483648 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) {
26788
26790
  return false;
26789
26791
  }
26790
26792
  return (kinds & 1 /* Parentheses */) !== 0;
26791
26793
  case 216 /* TypeAssertionExpression */:
26792
26794
  case 234 /* AsExpression */:
26793
- case 233 /* ExpressionWithTypeArguments */:
26794
26795
  case 238 /* SatisfiesExpression */:
26795
26796
  return (kinds & 2 /* TypeAssertions */) !== 0;
26797
+ case 233 /* ExpressionWithTypeArguments */:
26798
+ return (kinds & 16 /* ExpressionsWithTypeArguments */) !== 0;
26796
26799
  case 235 /* NonNullExpression */:
26797
26800
  return (kinds & 4 /* NonNullAssertions */) !== 0;
26798
26801
  case 354 /* PartiallyEmittedExpression */:
@@ -26800,13 +26803,13 @@ function isOuterExpression(node, kinds = 15 /* All */) {
26800
26803
  }
26801
26804
  return false;
26802
26805
  }
26803
- function skipOuterExpressions(node, kinds = 15 /* All */) {
26806
+ function skipOuterExpressions(node, kinds = 31 /* All */) {
26804
26807
  while (isOuterExpression(node, kinds)) {
26805
26808
  node = node.expression;
26806
26809
  }
26807
26810
  return node;
26808
26811
  }
26809
- function walkUpOuterExpressions(node, kinds = 15 /* All */) {
26812
+ function walkUpOuterExpressions(node, kinds = 31 /* All */) {
26810
26813
  let parent = node.parent;
26811
26814
  while (isOuterExpression(parent, kinds)) {
26812
26815
  parent = parent.parent;
@@ -77866,7 +77869,7 @@ function createTypeChecker(host) {
77866
77869
  if (isBinaryExpression(right) && (right.operatorToken.kind === 57 /* BarBarToken */ || right.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) {
77867
77870
  grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind));
77868
77871
  }
77869
- const leftTarget = skipOuterExpressions(left, 15 /* All */);
77872
+ const leftTarget = skipOuterExpressions(left, 31 /* All */);
77870
77873
  const nullishSemantics = getSyntacticNullishnessSemantics(leftTarget);
77871
77874
  if (nullishSemantics !== 3 /* Sometimes */) {
77872
77875
  if (node.parent.kind === 226 /* BinaryExpression */) {
@@ -92262,7 +92265,7 @@ function transformTypeScript(context) {
92262
92265
  return updated;
92263
92266
  }
92264
92267
  function visitParenthesizedExpression(node) {
92265
- const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
92268
+ const innerExpression = skipOuterExpressions(node.expression, ~(6 /* Assertions */ | 16 /* ExpressionsWithTypeArguments */));
92266
92269
  if (isAssertionExpression(innerExpression) || isSatisfiesExpression(innerExpression)) {
92267
92270
  const expression = visitNode(node.expression, visitor, isExpression);
92268
92271
  Debug.assert(expression);
@@ -7346,9 +7346,10 @@ declare namespace ts {
7346
7346
  TypeAssertions = 2,
7347
7347
  NonNullAssertions = 4,
7348
7348
  PartiallyEmittedExpressions = 8,
7349
+ ExpressionsWithTypeArguments = 16,
7349
7350
  Assertions = 6,
7350
- All = 15,
7351
- ExcludeJSDocTypeAssertion = 16,
7351
+ All = 31,
7352
+ ExcludeJSDocTypeAssertion = -2147483648,
7352
7353
  }
7353
7354
  type ImmediatelyInvokedFunctionExpression = CallExpression & {
7354
7355
  readonly expression: FunctionExpression;
package/lib/typescript.js CHANGED
@@ -2260,7 +2260,7 @@ module.exports = __toCommonJS(typescript_exports);
2260
2260
 
2261
2261
  // src/compiler/corePublic.ts
2262
2262
  var versionMajorMinor = "5.6";
2263
- var version = `${versionMajorMinor}.0-dev.20240806`;
2263
+ var version = `${versionMajorMinor}.0-dev.20240807`;
2264
2264
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2265
2265
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2266
2266
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -7113,9 +7113,10 @@ var OuterExpressionKinds = /* @__PURE__ */ ((OuterExpressionKinds2) => {
7113
7113
  OuterExpressionKinds2[OuterExpressionKinds2["TypeAssertions"] = 2] = "TypeAssertions";
7114
7114
  OuterExpressionKinds2[OuterExpressionKinds2["NonNullAssertions"] = 4] = "NonNullAssertions";
7115
7115
  OuterExpressionKinds2[OuterExpressionKinds2["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions";
7116
+ OuterExpressionKinds2[OuterExpressionKinds2["ExpressionsWithTypeArguments"] = 16] = "ExpressionsWithTypeArguments";
7116
7117
  OuterExpressionKinds2[OuterExpressionKinds2["Assertions"] = 6] = "Assertions";
7117
- OuterExpressionKinds2[OuterExpressionKinds2["All"] = 15] = "All";
7118
- OuterExpressionKinds2[OuterExpressionKinds2["ExcludeJSDocTypeAssertion"] = 16] = "ExcludeJSDocTypeAssertion";
7118
+ OuterExpressionKinds2[OuterExpressionKinds2["All"] = 31] = "All";
7119
+ OuterExpressionKinds2[OuterExpressionKinds2["ExcludeJSDocTypeAssertion"] = -2147483648] = "ExcludeJSDocTypeAssertion";
7119
7120
  return OuterExpressionKinds2;
7120
7121
  })(OuterExpressionKinds || {});
7121
7122
  var LexicalEnvironmentFlags = /* @__PURE__ */ ((LexicalEnvironmentFlags2) => {
@@ -19054,7 +19055,7 @@ function skipTypeParentheses(node) {
19054
19055
  return node;
19055
19056
  }
19056
19057
  function skipParentheses(node, excludeJSDocTypeAssertions) {
19057
- const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | 16 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */;
19058
+ const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | -2147483648 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */;
19058
19059
  return skipOuterExpressions(node, flags);
19059
19060
  }
19060
19061
  function isDeleteTarget(node) {
@@ -28011,6 +28012,8 @@ function createNodeFactory(flags, baseFactory2) {
28011
28012
  return updateSatisfiesExpression(outerExpression, expression, outerExpression.type);
28012
28013
  case 235 /* NonNullExpression */:
28013
28014
  return updateNonNullExpression(outerExpression, expression);
28015
+ case 233 /* ExpressionWithTypeArguments */:
28016
+ return updateExpressionWithTypeArguments(outerExpression, expression, outerExpression.typeArguments);
28014
28017
  case 354 /* PartiallyEmittedExpression */:
28015
28018
  return updatePartiallyEmittedExpression(outerExpression, expression);
28016
28019
  }
@@ -28018,7 +28021,7 @@ function createNodeFactory(flags, baseFactory2) {
28018
28021
  function isIgnorableParen(node) {
28019
28022
  return isParenthesizedExpression(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node));
28020
28023
  }
28021
- function restoreOuterExpressions(outerExpression, innerExpression, kinds = 15 /* All */) {
28024
+ function restoreOuterExpressions(outerExpression, innerExpression, kinds = 31 /* All */) {
28022
28025
  if (outerExpression && isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression)) {
28023
28026
  return updateOuterExpression(
28024
28027
  outerExpression,
@@ -28064,7 +28067,7 @@ function createNodeFactory(flags, baseFactory2) {
28064
28067
  }
28065
28068
  }
28066
28069
  function createCallBinding(expression, recordTempVariable, languageVersion, cacheIdentifiers = false) {
28067
- const callee = skipOuterExpressions(expression, 15 /* All */);
28070
+ const callee = skipOuterExpressions(expression, 31 /* All */);
28068
28071
  let thisArg;
28069
28072
  let target;
28070
28073
  if (isSuperProperty(callee)) {
@@ -31032,18 +31035,19 @@ function getJSDocTypeAssertionType(node) {
31032
31035
  Debug.assertIsDefined(type);
31033
31036
  return type;
31034
31037
  }
31035
- function isOuterExpression(node, kinds = 15 /* All */) {
31038
+ function isOuterExpression(node, kinds = 31 /* All */) {
31036
31039
  switch (node.kind) {
31037
31040
  case 217 /* ParenthesizedExpression */:
31038
- if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) {
31041
+ if (kinds & -2147483648 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) {
31039
31042
  return false;
31040
31043
  }
31041
31044
  return (kinds & 1 /* Parentheses */) !== 0;
31042
31045
  case 216 /* TypeAssertionExpression */:
31043
31046
  case 234 /* AsExpression */:
31044
- case 233 /* ExpressionWithTypeArguments */:
31045
31047
  case 238 /* SatisfiesExpression */:
31046
31048
  return (kinds & 2 /* TypeAssertions */) !== 0;
31049
+ case 233 /* ExpressionWithTypeArguments */:
31050
+ return (kinds & 16 /* ExpressionsWithTypeArguments */) !== 0;
31047
31051
  case 235 /* NonNullExpression */:
31048
31052
  return (kinds & 4 /* NonNullAssertions */) !== 0;
31049
31053
  case 354 /* PartiallyEmittedExpression */:
@@ -31051,13 +31055,13 @@ function isOuterExpression(node, kinds = 15 /* All */) {
31051
31055
  }
31052
31056
  return false;
31053
31057
  }
31054
- function skipOuterExpressions(node, kinds = 15 /* All */) {
31058
+ function skipOuterExpressions(node, kinds = 31 /* All */) {
31055
31059
  while (isOuterExpression(node, kinds)) {
31056
31060
  node = node.expression;
31057
31061
  }
31058
31062
  return node;
31059
31063
  }
31060
- function walkUpOuterExpressions(node, kinds = 15 /* All */) {
31064
+ function walkUpOuterExpressions(node, kinds = 31 /* All */) {
31061
31065
  let parent2 = node.parent;
31062
31066
  while (isOuterExpression(parent2, kinds)) {
31063
31067
  parent2 = parent2.parent;
@@ -82485,7 +82489,7 @@ function createTypeChecker(host) {
82485
82489
  if (isBinaryExpression(right) && (right.operatorToken.kind === 57 /* BarBarToken */ || right.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) {
82486
82490
  grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind));
82487
82491
  }
82488
- const leftTarget = skipOuterExpressions(left, 15 /* All */);
82492
+ const leftTarget = skipOuterExpressions(left, 31 /* All */);
82489
82493
  const nullishSemantics = getSyntacticNullishnessSemantics(leftTarget);
82490
82494
  if (nullishSemantics !== 3 /* Sometimes */) {
82491
82495
  if (node.parent.kind === 226 /* BinaryExpression */) {
@@ -97063,7 +97067,7 @@ function transformTypeScript(context) {
97063
97067
  return updated;
97064
97068
  }
97065
97069
  function visitParenthesizedExpression(node) {
97066
- const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */);
97070
+ const innerExpression = skipOuterExpressions(node.expression, ~(6 /* Assertions */ | 16 /* ExpressionsWithTypeArguments */));
97067
97071
  if (isAssertionExpression(innerExpression) || isSatisfiesExpression(innerExpression)) {
97068
97072
  const expression = visitNode(node.expression, visitor, isExpression);
97069
97073
  Debug.assert(expression);
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.6.0-dev.20240806",
5
+ "version": "5.6.0-dev.20240807",
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": "a745d1b20501c1c305ab2c338137318a8cd331a9"
117
+ "gitHead": "99878128f032786bd3ad1295402a04ca7002eeb2"
118
118
  }