| 
									
										
										
										
											2016-07-28 04:54:49 -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-04-26 09:24:42 -07:00
										 |  |  | import {Compiler, CompilerOptions, Component, ComponentFactory, Directive, Injector, NgModule, Pipe, Type} from '@angular/core'; | 
					
						
							| 
									
										
										
										
											2016-08-30 18:07:40 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-28 04:54:49 -07:00
										 |  |  | import {MetadataOverride} from './metadata_override'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-27 13:19:00 -08:00
										 |  |  | function unimplemented(): any { | 
					
						
							|  |  |  |   throw Error('unimplemented'); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2016-08-30 18:07:40 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-28 04:54:49 -07:00
										 |  |  | /** | 
					
						
							|  |  |  |  * Special interface to the compiler only used by testing | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @experimental | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export class TestingCompiler extends Compiler { | 
					
						
							|  |  |  |   get injector(): Injector { throw unimplemented(); } | 
					
						
							| 
									
										
										
										
											2016-09-12 09:44:20 -07:00
										 |  |  |   overrideModule(module: Type<any>, overrides: MetadataOverride<NgModule>): void { | 
					
						
							| 
									
										
										
										
											2016-07-28 04:54:49 -07:00
										 |  |  |     throw unimplemented(); | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2016-09-12 09:44:20 -07:00
										 |  |  |   overrideDirective(directive: Type<any>, overrides: MetadataOverride<Directive>): void { | 
					
						
							| 
									
										
										
										
											2016-07-28 04:54:49 -07:00
										 |  |  |     throw unimplemented(); | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2016-09-12 09:44:20 -07:00
										 |  |  |   overrideComponent(component: Type<any>, overrides: MetadataOverride<Component>): void { | 
					
						
							| 
									
										
										
										
											2016-07-28 04:54:49 -07:00
										 |  |  |     throw unimplemented(); | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2016-09-12 09:44:20 -07:00
										 |  |  |   overridePipe(directive: Type<any>, overrides: MetadataOverride<Pipe>): void { | 
					
						
							| 
									
										
										
										
											2016-07-28 04:54:49 -07:00
										 |  |  |     throw unimplemented(); | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2017-04-26 09:24:42 -07:00
										 |  |  |   /** | 
					
						
							|  |  |  |    * Allows to pass the compile summary from AOT compilation to the JIT compiler, | 
					
						
							|  |  |  |    * so that it can use the code generated by AOT. | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   loadAotSummaries(summaries: () => any[]) { throw unimplemented(); }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Gets the component factory for the given component. | 
					
						
							|  |  |  |    * This assumes that the component has been compiled before calling this call using | 
					
						
							|  |  |  |    * `compileModuleAndAllComponents*`. | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   getComponentFactory<T>(component: Type<T>): ComponentFactory<T> { throw unimplemented(); } | 
					
						
							| 
									
										
										
										
											2016-07-28 04:54:49 -07:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * A factory for creating a Compiler | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @experimental | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export abstract class TestingCompilerFactory { | 
					
						
							|  |  |  |   abstract createTestingCompiler(options?: CompilerOptions[]): TestingCompiler; | 
					
						
							|  |  |  | } |