@@ -152,10 +152,7 @@ class TemplateBindingTransformer extends NodeTransformer {
152152 templateBinding . value . source === lastTemplateBinding . key . source
153153 ) {
154154 const alias = this . #create< NGMicrosyntaxKey > (
155- {
156- type : 'NGMicrosyntaxKey' ,
157- name : templateBinding . key . source ,
158- } ,
155+ { type : 'NGMicrosyntaxKey' , name : templateBinding . key . source } ,
159156 templateBinding . key . span ,
160157 ) ;
161158 const updateSpanEnd = < T extends NGNode > ( node : T , end : number ) : T => ( {
@@ -164,10 +161,7 @@ class TemplateBindingTransformer extends NodeTransformer {
164161 } ) ;
165162 const updateExpressionAlias = (
166163 expression : NGMicrosyntaxExpression ,
167- ) => ( {
168- ...updateSpanEnd ( expression , alias . end ) ,
169- alias,
170- } ) ;
164+ ) => ( { ...updateSpanEnd ( expression , alias . end ) , alias } ) ;
171165
172166 const lastNode = body . pop ( ) ! ;
173167
@@ -188,10 +182,7 @@ class TemplateBindingTransformer extends NodeTransformer {
188182 }
189183
190184 return this . #create< NGMicrosyntax > (
191- {
192- type : 'NGMicrosyntax' ,
193- body,
194- } ,
185+ { type : 'NGMicrosyntax' , body } ,
195186 body . length === 0
196187 ? rawTemplateBindings [ 0 ] . sourceSpan
197188 : { start : body [ 0 ] . start , end : body . at ( - 1 ) ! . end } ,
@@ -206,10 +197,7 @@ class TemplateBindingTransformer extends NodeTransformer {
206197 const { key, value } = templateBinding ;
207198 if ( ! value ) {
208199 return this . #create< NGMicrosyntaxKey > (
209- {
210- type : 'NGMicrosyntaxKey' ,
211- name : this . #removePrefix( key . source ) ,
212- } ,
200+ { type : 'NGMicrosyntaxKey' , name : this . #removePrefix( key . source ) } ,
213201 key . span ,
214202 ) ;
215203 } else if ( index === 0 ) {
@@ -255,19 +243,13 @@ class TemplateBindingTransformer extends NodeTransformer {
255243 {
256244 type : 'NGMicrosyntaxLet' ,
257245 key : this . #create< NGMicrosyntaxKey > (
258- {
259- type : 'NGMicrosyntaxKey' ,
260- name : key . source ,
261- } ,
246+ { type : 'NGMicrosyntaxKey' , name : key . source } ,
262247 key . span ,
263248 ) ,
264249 value : ! value
265250 ? null
266251 : this . #create< NGMicrosyntaxKey > (
267- {
268- type : 'NGMicrosyntaxKey' ,
269- name : value . source ,
270- } ,
252+ { type : 'NGMicrosyntaxKey' , name : value . source } ,
271253 value . span ,
272254 ) ,
273255 } ,
@@ -279,17 +261,11 @@ class TemplateBindingTransformer extends NodeTransformer {
279261 {
280262 type : 'NGMicrosyntaxAs' ,
281263 key : this . #create< NGMicrosyntaxKey > (
282- {
283- type : 'NGMicrosyntaxKey' ,
284- name : value ! . source ,
285- } ,
264+ { type : 'NGMicrosyntaxKey' , name : value ! . source } ,
286265 value ! . span ,
287266 ) ,
288267 alias : this . #create< NGMicrosyntaxKey > (
289- {
290- type : 'NGMicrosyntaxKey' ,
291- name : key . source ,
292- } ,
268+ { type : 'NGMicrosyntaxKey' , name : key . source } ,
293269 key . span ,
294270 ) ,
295271 } ,
0 commit comments