2016-06-23 09:47:54 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/ * *  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  @license 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Copyright  Google  Inc .  All  Rights  Reserved . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Use  of  this  source  code  is  governed  by  an  MIT - style  license  that  can  be 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  found  in  the  LICENSE  file  at  https : //angular.io/license
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  { StaticReflector ,  StaticSymbol ,  StaticSymbolCache ,  StaticSymbolResolver ,  StaticSymbolResolverHost ,  core  as  compilerCore }  from  '@angular/compiler' ;  
						 
					
						
							
								
									
										
										
										
											2017-09-13 16:55:42 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  { CollectorOptions }  from  '@angular/compiler-cli/src/metadata/index' ;  
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  { MockStaticSymbolResolverHost ,  MockSummaryResolver }  from  './static_symbol_resolver_spec' ;  
						 
					
						
							
								
									
										
										
										
											2016-05-31 09:15:17 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								describe ( 'StaticReflector' ,  ( )  = >  {  
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  let  noContext : StaticSymbol ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  let  host : StaticSymbolResolverHost ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  let  symbolResolver : StaticSymbolResolver ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  let  reflector : StaticReflector ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-18 10:53:21 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  function  init ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      testData :  { [ key : string ] :  any }  =  DEFAULT_TEST_DATA , 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-01 13:23:34 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      decorators :  { name : string ,  filePath : string ,  ctor : any } [ ]  =  [ ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      errorRecorder ? :  ( error : any ,  fileName : string )  = >  void ,  collectorOptions? : CollectorOptions )  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  symbolCache  =  new  StaticSymbolCache ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-01 13:23:34 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    host  =  new  MockStaticSymbolResolverHost ( testData ,  collectorOptions ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-30 14:51:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  summaryResolver  =  new  MockSummaryResolver ( [ ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    spyOn ( summaryResolver ,  'isLibraryFile' ) . and . returnValue ( false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    symbolResolver  =  new  StaticSymbolResolver ( host ,  symbolCache ,  summaryResolver ,  errorRecorder ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    reflector  =  new  StaticReflector ( summaryResolver ,  symbolResolver ,  decorators ,  [ ] ,  errorRecorder ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    noContext  =  reflector . getStaticSymbol ( '' ,  '' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  beforeEach ( ( )  = >  init ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-24 10:03:10 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  function  simplify ( context : StaticSymbol ,  value : any )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    return  reflector . simplify ( context ,  value ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-02-18 10:53:21 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should get annotations for NgFor' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  NgFor  =  reflector . findDeclaration ( '@angular/common/src/directives/ng_for' ,  'NgFor' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( NgFor ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( annotations . length ) . toEqual ( 1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  annotation  =  annotations [ 0 ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( annotation . selector ) . toEqual ( '[ngFor][ngForOf]' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotation . inputs ) . toEqual ( [ 'ngForTrackBy' ,  'ngForOf' ,  'ngForTemplate' ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-24 10:03:10 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should get constructor for NgFor' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  NgFor  =  reflector . findDeclaration ( '@angular/common/src/directives/ng_for' ,  'NgFor' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-15 13:30:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  ViewContainerRef  =  reflector . findDeclaration ( '@angular/core' ,  'ViewContainerRef' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  TemplateRef  =  reflector . findDeclaration ( '@angular/core' ,  'TemplateRef' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  IterableDiffers  =  reflector . findDeclaration ( '@angular/core' ,  'IterableDiffers' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  ChangeDetectorRef  =  reflector . findDeclaration ( '@angular/core' ,  'ChangeDetectorRef' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  parameters  =  reflector . parameters ( NgFor ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( parameters ) . toEqual ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      [ ViewContainerRef ] ,  [ TemplateRef ] ,  [ IterableDiffers ] ,  [ ChangeDetectorRef ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should get annotations for HeroDetailComponent' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  HeroDetailComponent  = 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        reflector . findDeclaration ( 'src/app/hero-detail.component' ,  'HeroDetailComponent' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( HeroDetailComponent ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( annotations . length ) . toEqual ( 1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  annotation  =  annotations [ 0 ] ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( annotation . selector ) . toEqual ( 'my-hero-detail' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should get and empty annotation list for an unknown class' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  UnknownClass  =  reflector . findDeclaration ( 'src/app/app.component' ,  'UnknownClass' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( UnknownClass ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( annotations ) . toEqual ( [ ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should get and empty annotation list for a symbol with null value' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    init ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      '/tmp/test.ts' :  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  var  x  =  null ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( reflector . getStaticSymbol ( '/tmp/test.ts' ,  'x' ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotations ) . toEqual ( [ ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should get propMetadata for HeroDetailComponent' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  HeroDetailComponent  = 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        reflector . findDeclaration ( 'src/app/hero-detail.component' ,  'HeroDetailComponent' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  props  =  reflector . propMetadata ( HeroDetailComponent ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( props [ 'hero' ] ) . toBeTruthy ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( props [ 'onMouseOver' ] ) . toEqual ( [ compilerCore . createHostListener ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'mouseover' ,  [ '$event' ] ) ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should get an empty object from propMetadata for an unknown class' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  UnknownClass  =  reflector . findDeclaration ( 'src/app/app.component' ,  'UnknownClass' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  properties  =  reflector . propMetadata ( UnknownClass ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( properties ) . toEqual ( { } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should get empty parameters list for an unknown class ' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  UnknownClass  =  reflector . findDeclaration ( 'src/app/app.component' ,  'UnknownClass' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  parameters  =  reflector . parameters ( UnknownClass ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( parameters ) . toEqual ( [ ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-03 15:43:09 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should provide context for errors reported by the collector' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  SomeClass  =  reflector . findDeclaration ( 'src/error-reporting' ,  'SomeClass' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( ( )  = >  reflector . annotations ( SomeClass ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toThrow ( new  Error ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-11 17:26:35 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            'Error encountered resolving symbol values statically. A reasonable error message (position 13:34 in the original .ts file), resolving symbol ErrorSym in /tmp/src/error-references.d.ts, resolving symbol Link2 in /tmp/src/error-references.d.ts, resolving symbol Link1 in /tmp/src/error-references.d.ts, resolving symbol SomeClass in /tmp/src/error-reporting.d.ts, resolving symbol SomeClass in /tmp/src/error-reporting.d.ts' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-03 15:43:09 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should simplify primitive into itself' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  1 ) ) . toBe ( 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  true ) ) . toBe ( true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  'some value' ) ) . toBe ( 'some value' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-10-11 15:47:44 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should simplify a static symbol into itself' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  staticSymbol  =  reflector . getStaticSymbol ( '' ,  '' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-10-11 15:47:44 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  staticSymbol ) ) . toBe ( staticSymbol ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should simplify an array into a copy of the array' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  [ 1 ,  2 ,  3 ] ) ) . toEqual ( [ 1 ,  2 ,  3 ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify an object to a copy of the object' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  expr  =  { a : 1 ,  b : 2 ,  c : 3 } ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  expr ) ) . toEqual ( expr ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify &&' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '&&' ,  left : true ,  right : true } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '&&' ,  left : true ,  right : false } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '&&' ,  left : false ,  right : true } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '&&' ,  left : false ,  right : false } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify ||' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '||' ,  left : true ,  right : true } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '||' ,  left : true ,  right : false } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '||' ,  left : false ,  right : true } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '||' ,  left : false ,  right : false } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify &' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '&' ,  left : 0x22 ,  right : 0x0F } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  &  0x0F ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '&' ,  left : 0x22 ,  right : 0xF0 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  &  0xF0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify |' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '|' ,  left : 0x22 ,  right : 0x0F } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  |  0x0F ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '|' ,  left : 0x22 ,  right : 0xF0 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  |  0xF0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify ^' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '|' ,  left : 0x22 ,  right : 0x0F } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  |  0x0F ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '|' ,  left : 0x22 ,  right : 0xF0 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  |  0xF0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify ==' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '==' ,  left : 0x22 ,  right : 0x22 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  ==  0x22 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '==' ,  left : 0x22 ,  right : 0xF0 } ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-30 18:07:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toBe ( 0x22  as  any  ==  0xF0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify !=' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '!=' ,  left : 0x22 ,  right : 0x22 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  !=  0x22 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '!=' ,  left : 0x22 ,  right : 0xF0 } ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-30 18:07:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toBe ( 0x22  as  any  !=  0xF0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify ===' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '===' ,  left : 0x22 ,  right : 0x22 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  ===  0x22 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '===' ,  left : 0x22 ,  right : 0xF0 } ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-30 18:07:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toBe ( 0x22  as  any  ===  0xF0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify !==' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '!==' ,  left : 0x22 ,  right : 0x22 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x22  !==  0x22 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '!==' ,  left : 0x22 ,  right : 0xF0 } ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-30 18:07:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toBe ( 0x22  as  any  !==  0xF0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify >' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '>' ,  left : 1 ,  right : 1 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 1  >  1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '>' ,  left : 1 ,  right : 0 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 1  >  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '>' ,  left : 0 ,  right : 1 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0  >  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify >=' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '>=' ,  left : 1 ,  right : 1 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 1  >=  1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '>=' ,  left : 1 ,  right : 0 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 1  >=  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '>=' ,  left : 0 ,  right : 1 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0  >=  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify <=' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '<=' ,  left : 1 ,  right : 1 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 1  <=  1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '<=' ,  left : 1 ,  right : 0 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 1  <=  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '<=' ,  left : 0 ,  right : 1 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0  <=  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify <' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '<' ,  left : 1 ,  right : 1 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 1  <  1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '<' ,  left : 1 ,  right : 0 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 1  <  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '<' ,  left : 0 ,  right : 1 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0  <  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify <<' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '<<' ,  left : 0x55 ,  right : 2 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x55  <<  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify >>' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '>>' ,  left : 0x55 ,  right : 2 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x55  >>  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify +' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '+' ,  left : 0x55 ,  right : 2 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x55  +  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify -' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '-' ,  left : 0x55 ,  right : 2 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x55  -  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify *' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '*' ,  left : 0x55 ,  right : 2 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x55  *  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify /' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '/' ,  left : 0x55 ,  right : 2 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x55  /  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify %' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'binop' ,  operator :  '%' ,  left : 0x55 ,  right : 2 } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toBe ( 0x55  %  2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify prefix -' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'pre' ,  operator :  '-' ,  operand : 2 } ) ) ) . toBe ( - 2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify prefix ~' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'pre' ,  operator :  '~' ,  operand : 2 } ) ) ) . toBe ( ~ 2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify prefix !' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'pre' ,  operator :  '!' ,  operand : true } ) ) ) . toBe ( ! true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'pre' ,  operator :  '!' ,  operand : false } ) ) ) . toBe ( ! false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify an array index' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  ( { __symbolic :  'index' ,  expression :  [ 1 ,  2 ,  3 ] ,  index : 2 } ) ) ) . toBe ( 3 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify an object index' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  expr  =  { __symbolic :  'select' ,  expression :  { a : 1 ,  b : 2 ,  c : 3 } ,  member :  'b' } ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( noContext ,  expr ) ) . toBe ( 2 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should simplify a file reference' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/src/cases' ,  '' ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/src/extern.d.ts' ,  's' ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toEqual ( 's' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should simplify a non existing reference as a static symbol' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-08 16:38:52 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/src/cases' ,  '' ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/src/extern.d.ts' ,  'nonExisting' ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toEqual ( reflector . getStaticSymbol ( '/src/extern.d.ts' ,  'nonExisting' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
  modules: [BrowserModule],
  precompile: [MainComponent],
  providers: […], // additional providers
  directives: […], // additional platform directives
  pipes: […] // additional platform pipes
})
class MyModule {
  constructor(appRef: ApplicationRef) {
    appRef.bootstrap(MainComponent);
  }
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
  public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
  to inject compiler internals (i.e. everything 
  from `@angular/compiler). Inject `Compiler` instead.
  To provide custom providers for the compiler,
  create a custom compiler via `browserCompiler({providers: [...]})`
  and pass that into the `bootstrap` method.
											 
										 
										
											2016-06-30 13:07:17 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should simplify a function reference as a static symbol' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/src/cases' ,  'myFunction' ) , 
							 
						 
					
						
							
								
									
										
											 
										
											
												feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
  modules: [BrowserModule],
  precompile: [MainComponent],
  providers: […], // additional providers
  directives: […], // additional platform directives
  pipes: […] // additional platform pipes
})
class MyModule {
  constructor(appRef: ApplicationRef) {
    appRef.bootstrap(MainComponent);
  }
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
  public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
  to inject compiler internals (i.e. everything 
  from `@angular/compiler). Inject `Compiler` instead.
  To provide custom providers for the compiler,
  create a custom compiler via `browserCompiler({providers: [...]})`
  and pass that into the `bootstrap` method.
											 
										 
										
											2016-06-30 13:07:17 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								               ( { __symbolic :  'function' ,  parameters :  [ 'a' ] ,  value :  [ ] } ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toEqual ( reflector . getStaticSymbol ( '/src/cases' ,  'myFunction' ) ) ; 
							 
						 
					
						
							
								
									
										
											 
										
											
												feat(browser): use AppModules for bootstrap in the browser
This introduces the `BrowserModule` to be used for long form
bootstrap and offline compile bootstrap:
```
@AppModule({
  modules: [BrowserModule],
  precompile: [MainComponent],
  providers: […], // additional providers
  directives: […], // additional platform directives
  pipes: […] // additional platform pipes
})
class MyModule {
  constructor(appRef: ApplicationRef) {
    appRef.bootstrap(MainComponent);
  }
}
// offline compile
import {bootstrapModuleFactory} from ‘@angular/platform-browser’;
bootstrapModuleFactory(MyModuleNgFactory);
// runtime compile long form
import {bootstrapModule} from ‘@angular/platform-browser-dynamic’;
bootstrapModule(MyModule);
```
The short form, `bootstrap(...)`, can now creates a module on the fly,
given `directives`, `pipes, `providers`, `precompile` and `modules`
properties.
Related changes:
- make `SanitizationService`, `SecurityContext` public in `@angular/core` so that the offline compiler can resolve the token
- move `AnimationDriver` to `platform-browser` and make it
  public so that the offline compiler can resolve the token
BREAKING CHANGES:
- short form bootstrap does no longer allow
  to inject compiler internals (i.e. everything 
  from `@angular/compiler). Inject `Compiler` instead.
  To provide custom providers for the compiler,
  create a custom compiler via `browserCompiler({providers: [...]})`
  and pass that into the `bootstrap` method.
											 
										 
										
											2016-06-30 13:07:17 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should simplify values initialized with a function call' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/tmp/src/function-reference.ts' ,  '' ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/tmp/src/function-reference.ts' ,  'one' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toEqual ( [ 'some-value' ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( simplify ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/tmp/src/function-reference.ts' ,  '' ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/tmp/src/function-reference.ts' ,  'three' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toEqual ( 3 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should error on direct recursive calls' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ( )  = >  simplify ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            reflector . getStaticSymbol ( '/tmp/src/function-reference.ts' ,  '' ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            reflector . getStaticSymbol ( '/tmp/src/function-reference.ts' ,  'recursion' ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toThrow ( new  Error ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 05:29:20 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            'Recursion not supported, resolving symbol recursive in /tmp/src/function-recursive.d.ts, resolving symbol recursion in /tmp/src/function-reference.ts, resolving symbol  in /tmp/src/function-reference.ts' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-19 10:20:04 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should throw a SyntaxError without stack trace when the required resource cannot be resolved' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       expect ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								           ( )  = >  simplify ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/tmp/src/function-reference.ts' ,  'AppModule' ) ,  ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                 __symbolic :  'error' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                 message : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                     'Could not resolve ./does-not-exist.component relative to /tmp/src/function-reference.ts' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               } ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								           . toThrowError ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               'Error encountered resolving symbol values statically. Could not resolve ./does-not-exist.component relative to /tmp/src/function-reference.ts, resolving symbol AppModule in /tmp/src/function-reference.ts' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-09 16:29:22 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should record data about the error in the exception' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    let  threw  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    try  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-24 09:59:58 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      const  metadata  =  host . getMetadataFor ( '/tmp/src/invalid-metadata.ts' )  ! ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-09 16:29:22 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      expect ( metadata ) . toBeDefined ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-17 09:52:38 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      const  moduleMetadata : any  =  metadata [ 0 ] [ 'metadata' ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( moduleMetadata ) . toBeDefined ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  classData : any  =  moduleMetadata [ 'InvalidMetadata' ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( classData ) . toBeDefined ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      simplify ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          reflector . getStaticSymbol ( '/tmp/src/invalid-metadata.ts' ,  '' ) ,  classData . decorators [ 0 ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-09 16:29:22 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    }  catch  ( e )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( e . fileName ) . toBe ( '/tmp/src/invalid-metadata.ts' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      threw  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( threw ) . toBe ( true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should error on indirect recursive calls' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ( )  = >  simplify ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            reflector . getStaticSymbol ( '/tmp/src/function-reference.ts' ,  '' ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            reflector . getStaticSymbol ( '/tmp/src/function-reference.ts' ,  'indirectRecursion' ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toThrow ( new  Error ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 05:29:20 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            'Recursion not supported, resolving symbol indirectRecursion2 in /tmp/src/function-recursive.d.ts, resolving symbol indirectRecursion1 in /tmp/src/function-recursive.d.ts, resolving symbol indirectRecursion in /tmp/src/function-reference.ts, resolving symbol  in /tmp/src/function-reference.ts' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should simplify a spread expression' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-15 09:12:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( simplify ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/tmp/src/spread.ts' ,  '' ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               reflector . getStaticSymbol ( '/tmp/src/spread.ts' ,  'spread' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toEqual ( [ 0 ,  1 ,  2 ,  3 ,  4 ,  5 ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should be able to get metadata for a class containing a custom decorator' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-12 14:08:58 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  props  =  reflector . propMetadata ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        reflector . getStaticSymbol ( '/tmp/src/custom-decorator-reference.ts' ,  'Foo' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( props ) . toEqual ( { foo :  [ ] } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 09:19:00 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should read ctor parameters with forwardRef' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  src  =  '/tmp/src/forward-ref.ts' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  dep  =  reflector . getStaticSymbol ( src ,  'Dep' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  props  =  reflector . parameters ( reflector . getStaticSymbol ( src ,  'Forward' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( props ) . toEqual ( [ [ dep ,  compilerCore . createInject ( dep ) ] ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 09:19:00 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should report an error for invalid function calls' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ( )  = >  reflector . annotations ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            reflector . getStaticSymbol ( '/tmp/src/invalid-calls.ts' ,  'MyComponent' ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . toThrow ( new  Error ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ` Error encountered resolving symbol values statically. Calling function 'someFunction', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol MyComponent in /tmp/src/invalid-calls.ts, resolving symbol MyComponent in /tmp/src/invalid-calls.ts ` ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-26 10:18:35 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should be able to get metadata for a class containing a static method call' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        reflector . getStaticSymbol ( '/tmp/src/static-method-call.ts' ,  'MyComponent' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-26 10:18:35 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( annotations . length ) . toBe ( 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotations [ 0 ] . providers ) . toEqual ( { provider :  'a' ,  useValue : 100 } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-27 19:26:59 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should be able to get metadata for a class containing a static field reference' ,  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        reflector . getStaticSymbol ( '/tmp/src/static-field-reference.ts' ,  'Foo' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-27 19:26:59 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( annotations . length ) . toBe ( 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotations [ 0 ] . providers ) . toEqual ( [ { provider :  'a' ,  useValue :  'Some string' } ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-28 17:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should be able to get the metadata for a class calling a method with a conditional expression' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       const  annotations  =  reflector . annotations ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								           reflector . getStaticSymbol ( '/tmp/src/static-method-call.ts' ,  'MyCondComponent' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-28 17:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								       expect ( annotations . length ) . toBe ( 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       expect ( annotations [ 0 ] . providers ) . toEqual ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								         [ { provider :  'a' ,  useValue :  '1' } ] ,  [ { provider :  'a' ,  useValue :  '2' } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-29 09:10:45 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-29 12:02:50 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should be able to get metadata for a class with nested method calls' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        reflector . getStaticSymbol ( '/tmp/src/static-method-call.ts' ,  'MyFactoryComponent' ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotations . length ) . toBe ( 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotations [ 0 ] . providers ) . toEqual ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      provide :  'c' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      useFactory : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          reflector . getStaticSymbol ( '/tmp/src/static-method.ts' ,  'AnotherModule' ,  [ 'someFactory' ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-07-29 09:10:45 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should be able to get the metadata for a class calling a method with default parameters' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       const  annotations  =  reflector . annotations ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								           reflector . getStaticSymbol ( '/tmp/src/static-method-call.ts' ,  'MyDefaultsComponent' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-29 09:10:45 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								       expect ( annotations . length ) . toBe ( 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								       expect ( annotations [ 0 ] . providers ) . toEqual ( [ [ 'a' ,  true ,  false ] ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-23 11:58:12 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should be able to get metadata with a reference to a static method' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        reflector . getStaticSymbol ( '/tmp/src/static-method-ref.ts' ,  'MethodReference' ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-23 11:58:12 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( annotations . length ) . toBe ( 1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-12 09:44:20 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( annotations [ 0 ] . providers [ 0 ] . useValue . members [ 0 ] ) . toEqual ( 'staticMethod' ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-23 11:58:12 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-24 10:03:10 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-28 15:48:59 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should be able to get metadata for a class calling a macro function' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        reflector . getStaticSymbol ( '/tmp/src/call-macro-function.ts' ,  'MyComponent' ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotations . length ) . toBe ( 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotations [ 0 ] . providers . useValue ) . toBe ( 100 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should be able to get metadata for a class calling a nested macro function' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        reflector . getStaticSymbol ( '/tmp/src/call-macro-function.ts' ,  'MyComponentNested' ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotations . length ) . toBe ( 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotations [ 0 ] . providers . useValue . useValue ) . toBe ( 100 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-05 15:22:38 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  // #13605
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should not throw on unknown decorators' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  data  =  Object . create ( DEFAULT_TEST_DATA ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  file  =  '/tmp/src/app.component.ts' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    data [ file ]  =  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      import  {  Component  }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      export  const  enum  TypeEnum  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        type 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      export  function  MyValidationDecorator ( p1 : any ,  p2 : any ) :  any  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  null ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      export  function  ValidationFunction ( a1 : any ) :  any  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  null ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        selector :  'my-app' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        template :  "<h1>Hello {{name}}</h1>" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      export  class  AppComponent   { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        name  =  'Angular' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @MyValidationDecorator (  TypeEnum . type ,  ValidationFunction ( { option :  'value' } ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        myClassProp : number ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    init ( data ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  appComponent  =  reflector . getStaticSymbol ( file ,  'AppComponent' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( ( )  = >  reflector . propMetadata ( appComponent ) ) . not . toThrow ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-28 13:32:34 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should not throw with an invalid extends' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  data  =  Object . create ( DEFAULT_TEST_DATA ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  file  =  '/tmp/src/invalid-component.ts' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    data [ file ]  =  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        function  InvalidParent() { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          return  InvalidParent ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          selector :  'tmp' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          template :  '' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  BadComponent  extends  InvalidParent() { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    init ( data ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  badComponent  =  reflector . getStaticSymbol ( file ,  'BadComponent' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( reflector . propMetadata ( badComponent ) ) . toEqual ( { } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( reflector . parameters ( badComponent ) ) . toEqual ( [ ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( reflector . hasLifecycleHook ( badComponent ,  'onDestroy' ) ) . toEqual ( false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-01 13:23:34 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should produce a annotation even if it contains errors' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  data  =  Object . create ( DEFAULT_TEST_DATA ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  file  =  '/tmp/src/invalid-component.ts' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    data [ file ]  =  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          selector :  'tmp' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          template :  ( )  = >  { } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers :  [ 1 ,  2 ,  ( ( )  = >  { } ) ,  3 ,  ! ( ( )  = >  { } ) ,  4 ,  5 ,  ( ( )  = >  { } )  +  ( ( )  = >  { } ) ,  6 ,  7 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  BadComponent  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    init ( data ,  [ ] ,  ( )  = >  { } ,  { verboseInvalidExpression : true } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  badComponent  =  reflector . getStaticSymbol ( file ,  'BadComponent' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( badComponent ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotation  =  annotations [ 0 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotation . selector ) . toEqual ( 'tmp' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotation . template ) . toBeUndefined ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotation . providers ) . toEqual ( [ 1 ,  2 ,  3 ,  4 ,  5 ,  6 ,  7 ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-04-14 09:02:32 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  it ( 'should ignore unresolved calls' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  data  =  Object . create ( DEFAULT_TEST_DATA ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  file  =  '/tmp/src/invalid-component.ts' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    data [ file ]  =  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { unknown }  from  'unresolved' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          selector :  'tmp' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          template :  ( )  = >  { } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers :  [ triggers ( ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  BadComponent  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    init ( data ,  [ ] ,  ( )  = >  { } ,  { verboseInvalidExpression : true } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  badComponent  =  reflector . getStaticSymbol ( file ,  'BadComponent' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotations  =  reflector . annotations ( badComponent ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  annotation  =  annotations [ 0 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( annotation . providers ) . toEqual ( [ ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-04-20 13:09:58 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  // #15424
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should be able to inject a ctor parameter with a @Inject and a type expression' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  data  =  Object . create ( DEFAULT_TEST_DATA ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  file  =  '/tmp/src/invalid-component.ts' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    data [ file ]  =  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { Injectable ,  Inject }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Injectable ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  SomeClass  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          constructor  ( @Inject ( 'some-token' )  a :  { a : string ,  b : string } )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    init ( data ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  someClass  =  reflector . getStaticSymbol ( file ,  'SomeClass' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  parameters  =  reflector . parameters ( someClass ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expect ( compilerCore . createInject . isTypeOf ( parameters [ 0 ] [ 0 ] ) ) . toBe ( true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-20 13:09:58 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  it ( 'should reject a ctor parameter without a @Inject and a type exprssion' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  data  =  Object . create ( DEFAULT_TEST_DATA ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  file  =  '/tmp/src/invalid-component.ts' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    data [ file ]  =  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { Injectable }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Injectable ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  SomeClass  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          constructor  ( a :  { a : string ,  b : string } )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    let  error : any  =  undefined ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    init ( data ,  [ ] ,  ( err : any ,  filePath : string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( error ) . toBeUndefined ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      error  =  err ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  someClass  =  reflector . getStaticSymbol ( file ,  'SomeClass' ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( reflector . parameters ( someClass ) ) . toEqual ( [ [ ] ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect ( error ) . toBeUndefined ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  describe ( 'inheritance' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    class  ClassDecorator  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      constructor ( public  value : any )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    class  ParamDecorator  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      constructor ( public  value : any )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    class  PropDecorator  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      constructor ( public  value : any )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    function  initWithDecorator ( testData :  { [ key : string ] :  any } )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      testData [ '/tmp/src/decorator.ts' ]  =  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  function  ClassDecorator ( ) :  any  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  function  ParamDecorator ( ) :  any  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  function  PropDecorator ( ) :  any  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      init ( testData ,  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        { filePath :  '/tmp/src/decorator.ts' ,  name :  'ClassDecorator' ,  ctor : ClassDecorator } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        { filePath :  '/tmp/src/decorator.ts' ,  name :  'ParamDecorator' ,  ctor : ParamDecorator } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        { filePath :  '/tmp/src/decorator.ts' ,  name :  'PropDecorator' ,  ctor : PropDecorator } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    it ( 'should inherit annotations' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      initWithDecorator ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '/tmp/src/main.ts' :  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            import  { ClassDecorator }  from  './decorator' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            @ClassDecorator ( 'parent' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Parent  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            @ClassDecorator ( 'child' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Child  extends  Parent  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  ChildNoDecorators  extends  Parent  { } 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-27 09:36:47 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  ChildInvalidParent  extends  a . InvalidParent  { } 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // Check that metadata for Parent was not changed!
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . annotations ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Parent' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( [ new  ClassDecorator ( 'parent' ) ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . annotations ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Child' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( [ new  ClassDecorator ( 'parent' ) ,  new  ClassDecorator ( 'child' ) ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          reflector . annotations ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'ChildNoDecorators' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( [ new  ClassDecorator ( 'parent' ) ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-27 09:36:47 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . annotations ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                 reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'ChildInvalidParent' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( [ ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    it ( 'should inherit parameters' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      initWithDecorator ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '/tmp/src/main.ts' :  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            import  { ParamDecorator }  from  './decorator' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  A  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  B  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  C  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Parent  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              constructor ( @ParamDecorator ( 'a' )  a : A ,  @ParamDecorator ( 'b' )  b : B )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Child  extends  Parent  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  ChildWithCtor  extends  Parent  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              constructor ( @ParamDecorator ( 'c' )  c : C )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-27 09:36:47 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  ChildInvalidParent  extends  a . InvalidParent  { } 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // Check that metadata for Parent was not changed!
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . parameters ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Parent' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            [ reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'A' ) ,  new  ParamDecorator ( 'a' ) ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            [ reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'B' ) ,  new  ParamDecorator ( 'b' ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . parameters ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Child' ) ) ) . toEqual ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        [ reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'A' ) ,  new  ParamDecorator ( 'a' ) ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        [ reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'B' ) ,  new  ParamDecorator ( 'b' ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . parameters ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'ChildWithCtor' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( [ [ reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'C' ) ,  new  ParamDecorator ( 'c' ) ] ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-27 09:36:47 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          reflector . parameters ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'ChildInvalidParent' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( [ ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    it ( 'should inherit property metadata' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      initWithDecorator ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '/tmp/src/main.ts' :  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            import  { PropDecorator }  from  './decorator' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  A  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  B  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  C  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Parent  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              @PropDecorator ( 'a' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              a : A ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              @PropDecorator ( 'b1' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              b : B ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Child  extends  Parent  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              @PropDecorator ( 'b2' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              b : B ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              @PropDecorator ( 'c' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              c : C ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-27 09:36:47 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  ChildInvalidParent  extends  a . InvalidParent  { } 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // Check that metadata for Parent was not changed!
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . propMetadata ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Parent' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'a' :  [ new  PropDecorator ( 'a' ) ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'b' :  [ new  PropDecorator ( 'b1' ) ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . propMetadata ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Child' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'a' :  [ new  PropDecorator ( 'a' ) ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'b' :  [ new  PropDecorator ( 'b1' ) ,  new  PropDecorator ( 'b2' ) ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'c' :  [ new  PropDecorator ( 'c' ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-27 09:36:47 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . propMetadata ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                 reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'ChildInvalidParent' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( { } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    it ( 'should inherit lifecycle hooks' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      initWithDecorator ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '/tmp/src/main.ts' :  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Parent  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              hook1() { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              hook2() { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Child  extends  Parent  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              hook2() { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              hook3() { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-27 09:36:47 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  ChildInvalidParent  extends  a . InvalidParent  { } 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      function  hooks ( symbol :  StaticSymbol ,  names : string [ ] ) :  boolean [ ]  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  names . map ( name  = >  reflector . hasLifecycleHook ( symbol ,  name ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // Check that metadata for Parent was not changed!
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( hooks ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Parent' ) ,  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'hook1' ,  'hook2' ,  'hook3' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ] ) ) . toEqual ( [ true ,  true ,  false ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( hooks ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Child' ) ,  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'hook1' ,  'hook2' ,  'hook3' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ] ) ) . toEqual ( [ true ,  true ,  true ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-27 09:36:47 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( hooks ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'ChildInvalidParent' ) ,  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'hook1' ,  'hook2' ,  'hook3' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ] ) ) . toEqual ( [ false ,  false ,  false ] ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-27 15:35:31 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    it ( 'should allow inheritance from expressions' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      initWithDecorator ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '/tmp/src/main.ts' :  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  function  metaClass() {  return  null ;  } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Child  extends  metaClass() { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . annotations ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Child' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( [ ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    it ( 'should allow inheritance from functions' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      initWithDecorator ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '/tmp/src/main.ts' :  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  let  ctor :  { new ( ) :  T }  =  function ( )  {  return  null ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            export  class  Child  extends  ctor  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . annotations ( reflector . getStaticSymbol ( '/tmp/src/main.ts' ,  'Child' ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( [ ] ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-15 09:24:56 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    it ( 'should support constructor parameters with @Inject and an interface type' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  data  =  Object . create ( DEFAULT_TEST_DATA ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  file  =  '/tmp/src/inject_interface.ts' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      data [ file ]  =  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { Injectable ,  Inject }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { F }  from  './f' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  interface  InjectedInterface  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  Token  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Injectable ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  SomeClass  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          constructor  ( @Inject ( Token )  injected : InjectedInterface ,  t : Token ,  @Inject ( Token )  f : F )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      init ( data ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . parameters ( reflector . getStaticSymbol ( file ,  'SomeClass' ) ) [ 0 ] . length ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toEqual ( 1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-07-13 17:16:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  describe ( 'expression lowering' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    it ( 'should be able to accept a lambda in a reference location' ,  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  data  =  Object . create ( DEFAULT_TEST_DATA ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  file  =  '/tmp/src/my_component.ts' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      data [ file ]  =  ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { Component ,  InjectionToken }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  const  myLambda  =  ( )  = >  [ 1 ,  2 ,  3 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  const  NUMBERS  =  new  InjectionToken < number [ ] > ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          template :  '<div>{{name}}</div>' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers :  [ { provide : NUMBERS ,  useFactory : myLambda } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyComponent  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          name  =  'Some name' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      init ( data ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expect ( reflector . annotations ( reflector . getStaticSymbol ( file ,  'MyComponent' ) ) [ 0 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                 . providers [ 0 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                 . useFactory ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . toBe ( reflector . getStaticSymbol ( file ,  'myLambda' ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								} ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-18 15:17:44 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								const  DEFAULT_TEST_DATA :  { [ key : string ] :  any }  =  {  
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/@angular/common/src/forms-deprecated/directives.d.ts' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    '__symbolic' :  'module' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    'version' :  3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    'metadata' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      'FORM_DIRECTIVES' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '__symbolic' :  'reference' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'name' :  'NgFor' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'module' :  '@angular/common/src/directives/ng_for' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/@angular/common/src/directives/ng_for.d.ts' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    '__symbolic' :  'module' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    'version' :  3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    'metadata' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      'NgFor' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '__symbolic' :  'class' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'decorators' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          '__symbolic' :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          'expression' :  { '__symbolic' :  'reference' ,  'name' :  'Directive' ,  'module' :  '@angular/core' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          'arguments' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'selector' :  '[ngFor][ngForOf]' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'inputs' :  [ 'ngForTrackBy' ,  'ngForOf' ,  'ngForTemplate' ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'members' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          '__ctor__' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            '__symbolic' :  'constructor' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'parameters' :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              { '__symbolic' :  'reference' ,  'module' :  '@angular/core' ,  'name' :  'ViewContainerRef' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              { '__symbolic' :  'reference' ,  'module' :  '@angular/core' ,  'name' :  'TemplateRef' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              { '__symbolic' :  'reference' ,  'module' :  '@angular/core' ,  'name' :  'IterableDiffers' } ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                '__symbolic' :  'reference' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'module' :  '@angular/core' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                'name' :  'ChangeDetectorRef' 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								              } 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/@angular/core/src/linker/view_container_ref.d.ts' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      { version : 3 ,  'metadata' :  { 'ViewContainerRef' :  { '__symbolic' :  'class' } } } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/@angular/core/src/linker/template_ref.d.ts' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    version : 3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    'module' :  './template_ref' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    'metadata' :  { 'TemplateRef' :  { '__symbolic' :  'class' } } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/@angular/core/src/change_detection/differs/iterable_differs.d.ts' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      { version : 3 ,  'metadata' :  { 'IterableDiffers' :  { '__symbolic' :  'class' } } } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/@angular/core/src/change_detection/change_detector_ref.d.ts' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      { version : 3 ,  'metadata' :  { 'ChangeDetectorRef' :  { '__symbolic' :  'class' } } } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/src/app/hero-detail.component.d.ts' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    '__symbolic' :  'module' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    'version' :  3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    'metadata' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      'HeroDetailComponent' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        '__symbolic' :  'class' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'decorators' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          '__symbolic' :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          'expression' :  { '__symbolic' :  'reference' ,  'name' :  'Component' ,  'module' :  '@angular/core' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          'arguments' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'selector' :  'my-hero-detail' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'template' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                '\n  <div *ngIf="hero">\n    <h2>{{hero.name}} details!</h2>\n    <div><label>id: </label>{{hero.id}}</div>\n    <div>\n      <label>name: </label>\n      <input [(ngModel)]="hero.name" placeholder="name"/>\n    </div>\n  </div>\n' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'members' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          'hero' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            '__symbolic' :  'property' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'decorators' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              '__symbolic' :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              'expression' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  { '__symbolic' :  'reference' ,  'name' :  'Input' ,  'module' :  '@angular/core' } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          'onMouseOver' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            '__symbolic' :  'method' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            'decorators' :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              '__symbolic' :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              'expression' : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                  { '__symbolic' :  'reference' ,  'module' :  '@angular/core' ,  'name' :  'HostListener' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              'arguments' :  [ 'mouseover' ,  [ '$event' ] ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/src/extern.d.ts' :  { '__symbolic' :  'module' ,  'version' :  3 ,  metadata :  { s :  's' } } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/src/error-reporting.d.ts' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    __symbolic :  'module' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    version : 3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    metadata :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      SomeClass :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'class' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        decorators :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          __symbolic :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          expression :  { __symbolic :  'reference' ,  name :  'Component' ,  module :  '@angular/core' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          arguments :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            entryComponents :  [ { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              __symbolic :  'reference' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              module :  'src/error-references' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              name :  'Link1' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/src/error-references.d.ts' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    __symbolic :  'module' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    version : 3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    metadata :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      Link1 :  { __symbolic :  'reference' ,  module :  'src/error-references' ,  name :  'Link2' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      Link2 :  { __symbolic :  'reference' ,  module :  'src/error-references' ,  name :  'ErrorSym' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ErrorSym : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          { __symbolic :  'error' ,  message :  'A reasonable error message' ,  line : 12 ,  character : 33 } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/src/function-declaration.d.ts' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    __symbolic :  'module' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    version : 3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    metadata :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      one :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'function' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        parameters :  [ 'a' ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        value :  [ { __symbolic :  'reference' ,  name :  'a' } ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-04-30 12:27:37 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } , 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      add :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'function' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        parameters :  [ 'a' ,  'b' ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        value :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          __symbolic :  'binop' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          operator :  '+' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          left :  { __symbolic :  'reference' ,  name :  'a' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          right :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            __symbolic :  'binop' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            operator :  '+' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            left :  { __symbolic :  'reference' ,  name :  'b' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            right :  { __symbolic :  'reference' ,  name :  'oneLiteral' } 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-03 15:43:09 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } , 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      oneLiteral : 1 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/src/function-reference.ts' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    __symbolic :  'module' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    version : 3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    metadata :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      one :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        expression :  { __symbolic :  'reference' ,  module :  './function-declaration' ,  name :  'one' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        arguments :  [ 'some-value' ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } , 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      three :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        expression :  { __symbolic :  'reference' ,  module :  './function-declaration' ,  name :  'add' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        arguments :  [ 1 ,  1 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      recursion :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        expression :  { __symbolic :  'reference' ,  module :  './function-recursive' ,  name :  'recursive' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        arguments :  [ 1 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      indirectRecursion :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        expression : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            { __symbolic :  'reference' ,  module :  './function-recursive' ,  name :  'indirectRecursion1' } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        arguments :  [ 1 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/src/function-recursive.d.ts' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    __symbolic :  'modules' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    version : 3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    metadata :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      recursive :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'function' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        parameters :  [ 'a' ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        value :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          __symbolic :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          expression :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            __symbolic :  'reference' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            module :  './function-recursive' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            name :  'recursive' , 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-25 05:29:20 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } , 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          arguments :  [ { __symbolic :  'reference' ,  name :  'a' } ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } , 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      indirectRecursion1 :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'function' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        parameters :  [ 'a' ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        value :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          __symbolic :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          expression :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            __symbolic :  'reference' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            module :  './function-recursive' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            name :  'indirectRecursion2' , 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } , 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          arguments :  [ { __symbolic :  'reference' ,  name :  'a' } ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } , 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      indirectRecursion2 :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        __symbolic :  'function' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        parameters :  [ 'a' ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        value :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          __symbolic :  'call' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          expression :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            __symbolic :  'reference' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            module :  './function-recursive' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            name :  'indirectRecursion1' , 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          } , 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          arguments :  [ { __symbolic :  'reference' ,  name :  'a' } ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 15:56:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/src/spread.ts' :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    __symbolic :  'module' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    version : 3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    metadata :  { spread :  [ 0 ,  { __symbolic :  'spread' ,  expression :  [ 1 ,  2 ,  3 ,  4 ] } ,  5 ] } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  '/tmp/src/custom-decorator.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        export  function  CustomDecorator ( ) :  any  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          return  ( )  = >  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/custom-decorator-reference.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { CustomDecorator }  from  './custom-decorator' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @CustomDecorator ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  Foo  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          @CustomDecorator ( )  get  foo ( ) :  string  {  return  '' ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/invalid-calll-definitions.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        export  function  someFunction ( a : any )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if  ( Array . isArray ( a ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  a ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          return  undefined ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/invalid-calls.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { someFunction }  from  './nvalid-calll-definitions.ts' ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-15 13:30:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { NgIf }  from  '@angular/common' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          selector :  'my-component' , 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-19 12:51:01 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          entryComponents :  [ someFunction ( [ NgIf ] ) ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyComponent  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @someFunction ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          selector :  'my-component' , 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-19 12:51:01 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          entryComponents :  [ NgIf ] 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-17 13:11:00 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyOtherComponent  {  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-26 10:18:35 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/static-method.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core/src/metadata' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-26 10:18:35 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          selector :  'stub' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyModule  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          static  with ( data : any )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  {  provider :  'a' ,  useValue : data  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-28 17:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          static  condMethod ( cond : boolean )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  [ {  provider :  'a' ,  useValue : cond  ?  '1'  :  '2' } ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-29 09:10:45 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          static  defaultsMethod ( a ,  b  =  true ,  c  =  false )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  [ a ,  b ,  c ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-29 12:02:50 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          static  withFactory() { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  {  provide :  'c' ,  useFactory : AnotherModule.someFactory  } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  AnotherModule  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          static  someFactory() { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  'e' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-26 10:18:35 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/static-method-call.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-15 13:30:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-26 10:18:35 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { MyModule }  from  './static-method' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers : MyModule.with ( 100 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyComponent  {  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-28 17:32:29 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers :  [ MyModule . condMethod ( true ) ,  MyModule . condMethod ( false ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyCondComponent  {  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-29 09:10:45 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers :  [ MyModule . defaultsMethod ( 'a' ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyDefaultsComponent  {  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-29 12:02:50 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers : MyModule.withFactory ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyFactoryComponent  {  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-27 19:26:59 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/static-field.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { Injectable }  from  '@angular/core' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-27 19:26:59 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Injectable ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyModule  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          static  VALUE  =  'Some string' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/macro-function.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-28 15:48:59 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        export  function  v ( value : any )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          return  {  provide :  'a' ,  useValue : value  } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/call-macro-function.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-07-28 15:48:59 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { v }  from  './macro-function' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers : v ( 100 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyComponent  {  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers : v ( v ( 100 ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MyComponentNested  {  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/static-field-reference.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-15 13:30:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-07-27 19:26:59 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { MyModule }  from  './static-field' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers :  [  {  provider :  'a' ,  useValue : MyModule.VALUE  }  ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  Foo  {  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-23 11:58:12 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/static-method-def.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-23 11:58:12 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        export  class  ClassWithStatics  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          static  staticMethod() { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/static-method-ref.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-15 13:30:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-23 11:58:12 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { ClassWithStatics }  from  './static-method-def' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers :  [  {  provider :  'a' ,  useValue : ClassWithStatics.staticMethod } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  MethodReference  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-09 16:29:22 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/invalid-metadata.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-15 13:30:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-09 16:29:22 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        @Component ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          providers :  [  {  provider :  'a' ,  useValue :  ( ( )  = >  1 ) ( )  } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  InvalidMetadata  { } 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 09:19:00 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      ` ,
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  '/tmp/src/forward-ref.ts' :  ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 08:49:23 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { forwardRef }  from  '@angular/core' ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-15 13:30:40 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        import  { Component }  from  '@angular/core' ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        import  { Inject }  from  '@angular/core' ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-15 09:19:00 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        @Component ( { } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  Forward  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          constructor ( @Inject ( forwardRef ( ( )  = >  Dep ) )  d : Dep )  { } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        export  class  Dep  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          @Input  f : Forward ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-01 13:23:34 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-16 09:00:03 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								} ;