@@ -127,23 +127,14 @@ class Transformer extends Source {
127127 }
128128
129129 if ( node instanceof angular . BindingPipe ) {
130- const { name } = node ;
131- const left = transformChild < babel . Expression > ( node . exp ) ;
132- const leftEnd = node . exp . sourceSpan . end ;
133- const rightStart = super . getCharacterIndex (
134- / \S / ,
135- super . getCharacterIndex ( '|' , leftEnd ) + 1 ,
136- ) ;
137- const right = createNode < babel . Identifier > ( { type : 'Identifier' , name } , [
138- rightStart ,
139- rightStart + name . length ,
140- ] ) ;
141- const arguments_ = transformChildren < babel . Expression > ( node . args ) ;
142130 return createNode < NGPipeExpression > ( {
143131 type : 'NGPipeExpression' ,
144- left,
145- right,
146- arguments : arguments_ ,
132+ left : transformChild < babel . Expression > ( node . exp ) ,
133+ right : createNode < babel . Identifier > (
134+ { type : 'Identifier' , name : node . name } ,
135+ node . nameSpan ,
136+ ) ,
137+ arguments : transformChildren < babel . Expression > ( node . args ) ,
147138 } ) ;
148139 }
149140
@@ -331,6 +322,7 @@ class Transformer extends Source {
331322
332323 let { start } = node . sourceSpan ;
333324
325+ // https://github.com/angular/angular/issues/66174
334326 if ( operator === 'typeof' || operator === 'void' ) {
335327 const index = this . text . lastIndexOf ( operator , start ) ;
336328
0 commit comments