@@ -5,6 +5,7 @@ import { type Transformer } from '../transform-ast.ts';
55import type { NGChainedExpression , NGPipeExpression } from '../types.ts' ;
66import { visitBinary } from './transform-binary-expression.ts' ;
77import { visitCall , visitSafeCall } from './transform-call-expression.ts' ;
8+ import { visitConditional } from './transform-conditional-expression.ts' ;
89import {
910 visitLiteralPrimitive ,
1011 visitRegularExpressionLiteral ,
@@ -57,6 +58,8 @@ export const transformVisitor: AstVisitor = {
5758 visitTemplateLiteral,
5859 visitTemplateLiteralElement,
5960
61+ visitConditional,
62+
6063 visitPipe ( node : angular . BindingPipe , transformer : Transformer ) {
6164 return transformer . createNode < NGPipeExpression > ( {
6265 type : 'NGPipeExpression' ,
@@ -78,22 +81,6 @@ export const transformVisitor: AstVisitor = {
7881 } ) ;
7982 } ,
8083
81- visitConditional ( node : angular . Conditional , transformer : Transformer ) {
82- const [ test , consequent , alternate ] =
83- transformer . transformChildren < babel . Expression > ( [
84- node . condition ,
85- node . trueExp ,
86- node . falseExp ,
87- ] ) ;
88-
89- return transformer . createNode < babel . ConditionalExpression > ( {
90- type : 'ConditionalExpression' ,
91- test,
92- consequent,
93- alternate,
94- } ) ;
95- } ,
96-
9784 visitThisReceiver ( node : angular . ThisReceiver , transformer : Transformer ) {
9885 return transformer . createNode < babel . ThisExpression > ( {
9986 type : 'ThisExpression' ,
0 commit comments