fix(common): return ISubscription from Location.subscribe() (#20429)

Fix #20406

PR Close #20429
This commit is contained in:
Jason Aden
2017-11-14 10:41:37 -08:00
committed by Miško Hevery
parent 135cf226bf
commit bc904b19a4
5 changed files with 8 additions and 5 deletions

View File

@ -190,7 +190,7 @@ export declare class Location {
path(includeHash?: boolean): string;
prepareExternalUrl(url: string): string;
replaceState(path: string, query?: string): void;
subscribe(onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): Object;
subscribe(onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void) | null, onReturn?: (() => void) | null): ISubscription;
static joinWithSlash(start: string, end: string): string;
static normalizeQueryParams(params: string): string;
static stripTrailingSlash(url: string): string;

View File

@ -31,5 +31,5 @@ export declare class SpyLocation implements Location {
setInitialPath(url: string): void;
simulateHashChange(pathname: string): void;
simulateUrlPop(pathname: string): void;
subscribe(onNext: (value: any) => void, onThrow?: ((error: any) => void) | null, onReturn?: (() => void) | null): Object;
subscribe(onNext: (value: any) => void, onThrow?: ((error: any) => void) | null, onReturn?: (() => void) | null): ISubscription;
}