chore: noImplicitAny fixes

This commit is contained in:
Misko Hevery
2016-02-11 17:01:17 -08:00
committed by vsavkin
parent cfc1e56dd8
commit 8bb66a5eb3
38 changed files with 219 additions and 147 deletions

View File

@ -250,7 +250,7 @@ export class PlatformRef_ extends PlatformRef {
provide(ApplicationRef, {useFactory: (): ApplicationRef => app, deps: []})
]);
var exceptionHandler;
var exceptionHandler: Function;
try {
injector = this.injector.resolveAndCreateChild(providers);
exceptionHandler = injector.get(ExceptionHandler);
@ -427,7 +427,7 @@ export class ApplicationRef_ extends ApplicationRef {
try {
var injector: Injector = this._injector.resolveAndCreateChild(componentProviders);
var compRefToken: Promise<ComponentRef> = injector.get(APP_COMPONENT_REF_PROMISE);
var tick = (componentRef) => {
var tick = (componentRef: ComponentRef) => {
this._loadComponent(componentRef);
completer.resolve(componentRef);
};
@ -460,22 +460,23 @@ export class ApplicationRef_ extends ApplicationRef {
}
/** @internal */
_loadComponent(ref): void {
var appChangeDetector = (<ElementRef_>ref.location).internalElement.parentView.changeDetector;
_loadComponent(componentRef: ComponentRef): void {
var appChangeDetector =
(<ElementRef_>componentRef.location).internalElement.parentView.changeDetector;
this._changeDetectorRefs.push(appChangeDetector.ref);
this.tick();
this._rootComponents.push(ref);
this._bootstrapListeners.forEach((listener) => listener(ref));
this._rootComponents.push(componentRef);
this._bootstrapListeners.forEach((listener) => listener(componentRef));
}
/** @internal */
_unloadComponent(ref): void {
if (!ListWrapper.contains(this._rootComponents, ref)) {
_unloadComponent(componentRef: ComponentRef): void {
if (!ListWrapper.contains(this._rootComponents, componentRef)) {
return;
}
this.unregisterChangeDetector(
(<ElementRef_>ref.location).internalElement.parentView.changeDetector.ref);
ListWrapper.remove(this._rootComponents, ref);
(<ElementRef_>componentRef.location).internalElement.parentView.changeDetector.ref);
ListWrapper.remove(this._rootComponents, componentRef);
}
get injector(): Injector { return this._injector; }