@@ -101,8 +101,8 @@ PlatformRef getPlatform() {
101
101
* Shortcut for ApplicationRef.bootstrap.
102
102
* Requires a platform the be created first.
103
103
*/
104
- ComponentRef coreBootstrap (
105
- Injector injector, ComponentFactory componentFactory) {
104
+ ComponentRef < dynamic /*= C */ > coreBootstrap/*< C >*/ (
105
+ Injector injector, ComponentFactory < dynamic /*= C */ > componentFactory) {
106
106
ApplicationRef appRef = injector.get (ApplicationRef );
107
107
return appRef.bootstrap (componentFactory);
108
108
}
@@ -112,7 +112,7 @@ ComponentRef coreBootstrap(
112
112
* waits for asynchronous initializers and bootstraps the component.
113
113
* Requires a platform the be created first.
114
114
*/
115
- Future <ComponentRef > coreLoadAndBootstrap (
115
+ Future <ComponentRef < dynamic > > coreLoadAndBootstrap (
116
116
Injector injector, Type componentType) {
117
117
ApplicationRef appRef = injector.get (ApplicationRef );
118
118
return appRef.run (() {
@@ -210,7 +210,7 @@ abstract class ApplicationRef {
210
210
* Register a listener to be called each time `bootstrap()` is called to bootstrap
211
211
* a new root component.
212
212
*/
213
- void registerBootstrapListener (void listener (ComponentRef ref));
213
+ void registerBootstrapListener (void listener (ComponentRef < dynamic > ref));
214
214
/**
215
215
* Register a listener to be called when the application is disposed.
216
216
*/
@@ -237,7 +237,8 @@ abstract class ApplicationRef {
237
237
* ### Example
238
238
* {@example core/ts/platform/platform.ts region='longform'}
239
239
*/
240
- ComponentRef bootstrap (ComponentFactory componentFactory);
240
+ ComponentRef <dynamic /*= C */ > bootstrap/*< C >*/ (
241
+ ComponentFactory <dynamic /*= C */ > componentFactory);
241
242
/**
242
243
* Retrieve the application [Injector] .
243
244
*/
@@ -287,7 +288,7 @@ class ApplicationRef_ extends ApplicationRef {
287
288
/** @internal */
288
289
List <Function > _disposeListeners = [];
289
290
/** @internal */
290
- List <ComponentRef > _rootComponents = [];
291
+ List <ComponentRef < dynamic > > _rootComponents = [];
291
292
/** @internal */
292
293
List <Type > _rootComponentTypes = [];
293
294
/** @internal */
@@ -338,7 +339,7 @@ class ApplicationRef_ extends ApplicationRef {
338
339
});
339
340
});
340
341
}
341
- void registerBootstrapListener (void listener (ComponentRef ref)) {
342
+ void registerBootstrapListener (void listener (ComponentRef < dynamic > ref)) {
342
343
this ._bootstrapListeners.add (listener);
343
344
}
344
345
@@ -390,7 +391,8 @@ class ApplicationRef_ extends ApplicationRef {
390
391
return isPromise (result) ? completer.promise : result;
391
392
}
392
393
393
- ComponentRef bootstrap (ComponentFactory componentFactory) {
394
+ ComponentRef <dynamic /*= C */ > bootstrap/*< C >*/ (
395
+ ComponentFactory <dynamic /*= C */ > componentFactory) {
394
396
if (! this ._asyncInitDone) {
395
397
throw new BaseException (
396
398
"Cannot bootstrap as there are still asynchronous initializers running. Wait for them using waitForAsyncInitializers()." );
@@ -419,15 +421,15 @@ class ApplicationRef_ extends ApplicationRef {
419
421
}
420
422
421
423
/** @internal */
422
- void _loadComponent (ComponentRef componentRef) {
424
+ void _loadComponent (ComponentRef < dynamic > componentRef) {
423
425
this ._changeDetectorRefs.add (componentRef.changeDetectorRef);
424
426
this .tick ();
425
427
this ._rootComponents.add (componentRef);
426
428
this ._bootstrapListeners.forEach ((listener) => listener (componentRef));
427
429
}
428
430
429
431
/** @internal */
430
- void _unloadComponent (ComponentRef componentRef) {
432
+ void _unloadComponent (ComponentRef < dynamic > componentRef) {
431
433
if (! ListWrapper .contains (this ._rootComponents, componentRef)) {
432
434
return ;
433
435
}
0 commit comments