fix(common): Update types for TypeScript nullability support

This commit is contained in:
Miško Hevery
2017-03-24 09:54:02 -07:00
committed by Hans
parent 4c566dbfbb
commit d8b73e4223
29 changed files with 126 additions and 117 deletions

View File

@ -25,7 +25,7 @@ export class SpyLocation implements Location {
/** @internal */
_baseHref: string = '';
/** @internal */
_platformStrategy: LocationStrategy = null;
_platformStrategy: LocationStrategy = null !;
setInitialPath(url: string) { this._history[this._historyIndex].path = url; }
@ -106,12 +106,12 @@ export class SpyLocation implements Location {
}
subscribe(
onNext: (value: any) => void, onThrow: (error: any) => void = null,
onReturn: () => void = null): Object {
onNext: (value: any) => void, onThrow?: ((error: any) => void)|null,
onReturn?: (() => void)|null): Object {
return this._subject.subscribe({next: onNext, error: onThrow, complete: onReturn});
}
normalize(url: string): string { return null; }
normalize(url: string): string { return null !; }
}
class LocationState {