@typescript-eslint/typescript-estree 8.60.2-alpha.1 → 8.60.2-alpha.3

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.
Files changed (2) hide show
  1. package/dist/convert.js +7 -1
  2. package/package.json +5 -5
package/dist/convert.js CHANGED
@@ -1355,11 +1355,17 @@ class Converter {
1355
1355
  prefix: node.kind === SyntaxKind.PrefixUnaryExpression,
1356
1356
  });
1357
1357
  }
1358
+ const isPrefixUnaryExpression = node.kind === SyntaxKind.PrefixUnaryExpression;
1359
+ if (!isPrefixUnaryExpression) {
1360
+ this.#throwError(node, `Unexpected PrefixUnaryExpression with operator ${operator}`);
1361
+ }
1358
1362
  return this.createNode(node, {
1359
1363
  type: ts_estree_1.AST_NODE_TYPES.UnaryExpression,
1360
1364
  argument: this.convertChild(node.operand),
1361
1365
  operator,
1362
- prefix: node.kind === SyntaxKind.PrefixUnaryExpression,
1366
+ // Guaranteed to be true in a valid AST (and asserted above) but
1367
+ // technically could be false at runtime with allowInvalidAST: true.
1368
+ prefix: isPrefixUnaryExpression,
1363
1369
  });
1364
1370
  }
1365
1371
  case SyntaxKind.DeleteExpression:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/typescript-estree",
3
- "version": "8.60.2-alpha.1",
3
+ "version": "8.60.2-alpha.3",
4
4
  "description": "A parser that converts TypeScript source code into an ESTree compatible form",
5
5
  "files": [
6
6
  "dist",
@@ -49,10 +49,10 @@
49
49
  "semver": "^7.7.3",
50
50
  "tinyglobby": "^0.2.15",
51
51
  "ts-api-utils": "^2.5.0",
52
- "@typescript-eslint/visitor-keys": "8.60.2-alpha.1",
53
- "@typescript-eslint/tsconfig-utils": "8.60.2-alpha.1",
54
- "@typescript-eslint/project-service": "8.60.2-alpha.1",
55
- "@typescript-eslint/types": "8.60.2-alpha.1"
52
+ "@typescript-eslint/project-service": "8.60.2-alpha.3",
53
+ "@typescript-eslint/tsconfig-utils": "8.60.2-alpha.3",
54
+ "@typescript-eslint/visitor-keys": "8.60.2-alpha.3",
55
+ "@typescript-eslint/types": "8.60.2-alpha.3"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@typescript/native-preview": "7.0.0-dev.20260518.1",