refactor(all): enable ts strict

This commit is contained in:
Manu Mtz.-Almeida
2018-04-03 17:30:25 +02:00
parent ea24ad677d
commit fd5c957787
44 changed files with 1065 additions and 1475 deletions

View File

@ -6,10 +6,10 @@ import { attachComponent } from '../../utils/framework-delegate';
export class ViewController {
nav: Nav;
nav: Nav|undefined;
state: ViewState = ViewState.New;
element: HTMLElement;
delegate: FrameworkDelegate;
element: HTMLElement|undefined;
delegate: FrameworkDelegate|undefined;
constructor(
public component: any,
@ -43,12 +43,12 @@ export class ViewController {
element.remove();
}
}
this.nav = null;
this.nav = undefined;
this.state = ViewState.Destroyed;
}
}
export function matches(view: ViewController|undefined, id: string, params: ComponentProps): boolean {
export function matches(view: ViewController|undefined, id: string, params: ComponentProps): view is ViewController {
if (!view) {
return false;
}