File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -605,6 +605,10 @@ class Transformer extends Source {
605605 ) ;
606606 }
607607
608+ if ( node instanceof angular . ParenthesizedExpression ) {
609+ return this . #transformNode( node . expression ) ;
610+ }
611+
608612 /* c8 ignore next */
609613 throw new Error ( `Unexpected node type '${ node . constructor . name } '` ) ;
610614 }
@@ -636,7 +640,8 @@ type SupportedNodes =
636640 | angular . TypeofExpression
637641 | angular . VoidExpression
638642 | angular . TemplateLiteral // Including `TemplateLiteralElement`
639- | angular . TaggedTemplateLiteral ;
643+ | angular . TaggedTemplateLiteral
644+ | angular . ParenthesizedExpression ;
640645function transform ( node : SupportedNodes , text : string ) : NGNode {
641646 return new Transformer ( node , text ) . node ;
642647}
Original file line number Diff line number Diff line change @@ -169,9 +169,17 @@ const KNOWN_AST_TYPES = [
169169 'SafePropertyRead' ,
170170 'ThisReceiver' ,
171171 'Interpolation' ,
172+ 'VoidExpression' ,
173+ 'TemplateLiteral' ,
174+ 'TaggedTemplateLiteral' ,
175+ 'ParenthesizedExpression' ,
172176] as const ;
173177
174178export function getAngularNodeType ( node : angular . AST ) {
179+ if ( node instanceof angular . ParenthesizedExpression ) {
180+ return getAngularNodeType ( node . expression ) ;
181+ }
182+
175183 return (
176184 KNOWN_AST_TYPES . find ( ( type ) => node instanceof angular [ type ] ) ??
177185 node . constructor . name
You can’t perform that action at this time.
0 commit comments