@@ -94,8 +94,8 @@ export function getPlatform(): PlatformRef {
9494 * Shortcut for ApplicationRef.bootstrap.
9595 * Requires a platform the be created first.
9696 */
97- export function coreBootstrap ( injector : Injector ,
98- componentFactory : ComponentFactory ) : ComponentRef {
97+ export function coreBootstrap < C > ( injector : Injector ,
98+ componentFactory : ComponentFactory < C > ) : ComponentRef < C > {
9999 var appRef : ApplicationRef = injector . get ( ApplicationRef ) ;
100100 return appRef . bootstrap ( componentFactory ) ;
101101}
@@ -106,7 +106,7 @@ export function coreBootstrap(injector: Injector,
106106 * Requires a platform the be created first.
107107 */
108108export function coreLoadAndBootstrap ( injector : Injector ,
109- componentType : Type ) : Promise < ComponentRef > {
109+ componentType : Type ) : Promise < ComponentRef < any > > {
110110 var appRef : ApplicationRef = injector . get ( ApplicationRef ) ;
111111 return appRef . run ( ( ) => {
112112 var componentResolver : ComponentResolver = injector . get ( ComponentResolver ) ;
@@ -190,7 +190,7 @@ export abstract class ApplicationRef {
190190 * Register a listener to be called each time `bootstrap()` is called to bootstrap
191191 * a new root component.
192192 */
193- abstract registerBootstrapListener ( listener : ( ref : ComponentRef ) => void ) : void ;
193+ abstract registerBootstrapListener ( listener : ( ref : ComponentRef < any > ) => void ) : void ;
194194
195195 /**
196196 * Register a listener to be called when the application is disposed.
@@ -221,7 +221,7 @@ export abstract class ApplicationRef {
221221 * ### Example
222222 * {@example core/ts/platform/platform.ts region='longform'}
223223 */
224- abstract bootstrap ( componentFactory : ComponentFactory ) : ComponentRef ;
224+ abstract bootstrap < C > ( componentFactory : ComponentFactory < C > ) : ComponentRef < C > ;
225225
226226 /**
227227 * Retrieve the application {@link Injector}.
@@ -266,7 +266,7 @@ export class ApplicationRef_ extends ApplicationRef {
266266 /** @internal */
267267 private _disposeListeners : Function [ ] = [ ] ;
268268 /** @internal */
269- private _rootComponents : ComponentRef [ ] = [ ] ;
269+ private _rootComponents : ComponentRef < any > [ ] = [ ] ;
270270 /** @internal */
271271 private _rootComponentTypes : Type [ ] = [ ] ;
272272 /** @internal */
@@ -315,7 +315,7 @@ export class ApplicationRef_ extends ApplicationRef {
315315 ( _ ) => { this . _zone . run ( ( ) => { this . tick ( ) ; } ) ; } ) ;
316316 }
317317
318- registerBootstrapListener ( listener : ( ref : ComponentRef ) => void ) : void {
318+ registerBootstrapListener ( listener : ( ref : ComponentRef < any > ) => void ) : void {
319319 this . _bootstrapListeners . push ( listener ) ;
320320 }
321321
@@ -357,7 +357,7 @@ export class ApplicationRef_ extends ApplicationRef {
357357 return isPromise ( result ) ? completer . promise : result ;
358358 }
359359
360- bootstrap ( componentFactory : ComponentFactory ) : ComponentRef {
360+ bootstrap < C > ( componentFactory : ComponentFactory < C > ) : ComponentRef < C > {
361361 if ( ! this . _asyncInitDone ) {
362362 throw new BaseException (
363363 'Cannot bootstrap as there are still asynchronous initializers running. Wait for them using waitForAsyncInitializers().' ) ;
@@ -383,15 +383,15 @@ export class ApplicationRef_ extends ApplicationRef {
383383 }
384384
385385 /** @internal */
386- _loadComponent ( componentRef : ComponentRef ) : void {
386+ _loadComponent ( componentRef : ComponentRef < any > ) : void {
387387 this . _changeDetectorRefs . push ( componentRef . changeDetectorRef ) ;
388388 this . tick ( ) ;
389389 this . _rootComponents . push ( componentRef ) ;
390390 this . _bootstrapListeners . forEach ( ( listener ) => listener ( componentRef ) ) ;
391391 }
392392
393393 /** @internal */
394- _unloadComponent ( componentRef : ComponentRef ) : void {
394+ _unloadComponent ( componentRef : ComponentRef < any > ) : void {
395395 if ( ! ListWrapper . contains ( this . _rootComponents , componentRef ) ) {
396396 return ;
397397 }
0 commit comments