Skip to content

Commit

Permalink
replace kind variable by parenthesized expression
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-michelet committed Feb 5, 2024
1 parent 7267e7c commit aea8d75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/compiler/transformers/ts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1697,8 +1697,7 @@ export function transformTypeScript(context: TransformationContext) {
}

function visitParenthesizedExpression(node: ParenthesizedExpression): Expression {
const kinds = OuterExpressionKinds.Assertions | OuterExpressionKinds.SatisfiesExpressions;
const innerExpression = skipOuterExpressions(node.expression, ~kinds);
const innerExpression = skipOuterExpressions(node.expression, ~(OuterExpressionKinds.Assertions | OuterExpressionKinds.SatisfiesExpressions));
if (isAssertionExpression(innerExpression) || isSatisfiesExpression(innerExpression)) {
// Make sure we consider all nested cast expressions, e.g.:
// (<any><number><any>-A).x;
Expand Down

0 comments on commit aea8d75

Please sign in to comment.