"throw" is type JSThrowStatement, not UnaryExpression
MODIFY
internal/ast/js/expressions/JSUnaryExpression.ts
internal/ast/js/expressions/JSUnaryExpression.ts
@@ -15,15 +15,7 @@ export interface JSUnaryExpression extends NodeBaseWithComments {
readonly argument: AnyJSExpression;
}
-export type UnaryOperator =
- | "-"
- | "+"
- | "!"
- | "~"
- | "typeof"
- | "void"
- | "delete"
- | "throw";
+export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
export const jsUnaryExpression = createBuilder<JSUnaryExpression>(
"JSUnaryExpression",

MODIFY
internal/js-analysis/evaluators/expressions/JSUnaryExpression.ts
internal/js-analysis/evaluators/expressions/JSUnaryExpression.ts
@@ -35,10 +35,6 @@ export default function JSUnaryExpression(node: AnyNode, scope: Scope) {
// void
case "void":
return new VoidT(scope, node);
-
- // empty!
- case "throw":
- break;
}
return undefined;

"throw" is type JSThrowStatement, not UnaryExpression (#1138)