@@ -289,56 +289,56 @@ export function ɵɵdefineComponent<T>(componentDefinition: {
289
289
*/
290
290
schemas ?: SchemaMetadata [ ] | null ;
291
291
} ) : never {
292
- // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.
293
- // See the `initNgDevMode` docstring for more information .
294
- ( typeof ngDevMode === 'undefined' || ngDevMode ) && initNgDevMode ( ) ;
295
-
296
- const type = componentDefinition . type ;
297
- const typePrototype = type . prototype ;
298
- const declaredInputs : { [ key : string ] : string } = { } as any ;
299
- const def : Mutable < ComponentDef < any > , keyof ComponentDef < any > > = {
300
- type : type ,
301
- providersResolver : null ,
302
- decls : componentDefinition . decls ,
303
- vars : componentDefinition . vars ,
304
- factory : null ,
305
- template : componentDefinition . template || null ! ,
306
- consts : componentDefinition . consts || null ,
307
- ngContentSelectors : componentDefinition . ngContentSelectors ,
308
- hostBindings : componentDefinition . hostBindings || null ,
309
- hostVars : componentDefinition . hostVars || 0 ,
310
- hostAttrs : componentDefinition . hostAttrs || null ,
311
- contentQueries : componentDefinition . contentQueries || null ,
312
- declaredInputs : declaredInputs ,
313
- inputs : null ! , // assigned in noSideEffects
314
- outputs : null ! , // assigned in noSideEffects
315
- exportAs : componentDefinition . exportAs || null ,
316
- onChanges : null ,
317
- onInit : typePrototype . ngOnInit || null ,
318
- doCheck : typePrototype . ngDoCheck || null ,
319
- afterContentInit : typePrototype . ngAfterContentInit || null ,
320
- afterContentChecked : typePrototype . ngAfterContentChecked || null ,
321
- afterViewInit : typePrototype . ngAfterViewInit || null ,
322
- afterViewChecked : typePrototype . ngAfterViewChecked || null ,
323
- onDestroy : typePrototype . ngOnDestroy || null ,
324
- onPush : componentDefinition . changeDetection === ChangeDetectionStrategy . OnPush ,
325
- directiveDefs : null ! , // assigned in noSideEffects
326
- pipeDefs : null ! , // assigned in noSideEffects
327
- selectors : componentDefinition . selectors || EMPTY_ARRAY ,
328
- viewQuery : componentDefinition . viewQuery || null ,
329
- features : componentDefinition . features as DirectiveDefFeature [ ] || null ,
330
- data : componentDefinition . data || { } ,
331
- // TODO(misko): convert ViewEncapsulation into const enum so that it can be used directly in the
332
- // next line. Also `None` should be 0 not 2.
333
- encapsulation : componentDefinition . encapsulation || ViewEncapsulation . Emulated ,
334
- id : 'c' ,
335
- styles : componentDefinition . styles || EMPTY_ARRAY ,
336
- _ : null as never ,
337
- setInput : null ,
338
- schemas : componentDefinition . schemas || null ,
339
- tView : null ,
340
- } ;
341
- def . _ = noSideEffects ( ( ) => {
292
+ return noSideEffects ( ( ) => {
293
+ // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent .
294
+ // See the `initNgDevMode` docstring for more information.
295
+ ( typeof ngDevMode === 'undefined' || ngDevMode ) && initNgDevMode ( ) ;
296
+
297
+ const type = componentDefinition . type ;
298
+ const typePrototype = type . prototype ;
299
+ const declaredInputs : { [ key : string ] : string } = { } as any ;
300
+ const def : Mutable < ComponentDef < any > , keyof ComponentDef < any > > = {
301
+ type : type ,
302
+ providersResolver : null ,
303
+ decls : componentDefinition . decls ,
304
+ vars : componentDefinition . vars ,
305
+ factory : null ,
306
+ template : componentDefinition . template || null ! ,
307
+ consts : componentDefinition . consts || null ,
308
+ ngContentSelectors : componentDefinition . ngContentSelectors ,
309
+ hostBindings : componentDefinition . hostBindings || null ,
310
+ hostVars : componentDefinition . hostVars || 0 ,
311
+ hostAttrs : componentDefinition . hostAttrs || null ,
312
+ contentQueries : componentDefinition . contentQueries || null ,
313
+ declaredInputs : declaredInputs ,
314
+ inputs : null ! , // assigned in noSideEffects
315
+ outputs : null ! , // assigned in noSideEffects
316
+ exportAs : componentDefinition . exportAs || null ,
317
+ onChanges : null ,
318
+ onInit : typePrototype . ngOnInit || null ,
319
+ doCheck : typePrototype . ngDoCheck || null ,
320
+ afterContentInit : typePrototype . ngAfterContentInit || null ,
321
+ afterContentChecked : typePrototype . ngAfterContentChecked || null ,
322
+ afterViewInit : typePrototype . ngAfterViewInit || null ,
323
+ afterViewChecked : typePrototype . ngAfterViewChecked || null ,
324
+ onDestroy : typePrototype . ngOnDestroy || null ,
325
+ onPush : componentDefinition . changeDetection === ChangeDetectionStrategy . OnPush ,
326
+ directiveDefs : null ! , // assigned in noSideEffects
327
+ pipeDefs : null ! , // assigned in noSideEffects
328
+ selectors : componentDefinition . selectors || EMPTY_ARRAY ,
329
+ viewQuery : componentDefinition . viewQuery || null ,
330
+ features : componentDefinition . features as DirectiveDefFeature [ ] || null ,
331
+ data : componentDefinition . data || { } ,
332
+ // TODO(misko): convert ViewEncapsulation into const enum so that it can be used directly in
333
+ // the next line. Also `None` should be 0 not 2.
334
+ encapsulation : componentDefinition . encapsulation || ViewEncapsulation . Emulated ,
335
+ id : 'c' ,
336
+ styles : componentDefinition . styles || EMPTY_ARRAY ,
337
+ _ : null as never ,
338
+ setInput : null ,
339
+ schemas : componentDefinition . schemas || null ,
340
+ tView : null ,
341
+ } ;
342
342
const directiveTypes = componentDefinition . directives ! ;
343
343
const feature = componentDefinition . features ;
344
344
const pipeTypes = componentDefinition . pipes ! ;
@@ -353,9 +353,9 @@ export function ɵɵdefineComponent<T>(componentDefinition: {
353
353
def . pipeDefs = pipeTypes ?
354
354
( ) => ( typeof pipeTypes === 'function' ? pipeTypes ( ) : pipeTypes ) . map ( extractPipeDef ) :
355
355
null ;
356
- } ) as never ;
357
356
358
- return def as never ;
357
+ return def as never ;
358
+ } ) ;
359
359
}
360
360
361
361
/**
0 commit comments