refactor(router): remove type casting from wrapIntoObservable private function (#26521)

PR Close #26521
This commit is contained in:
Jason Aden 2018-10-04 14:41:10 -07:00 committed by Matias Niemelä
parent 6712492dc2
commit 17586f1e94
1 changed files with 2 additions and 3 deletions

View File

@ -96,8 +96,7 @@ export function andObservables(observables: Observable<Observable<any>>): Observ
return observables.pipe(mergeAll(), every((result: any) => result === true));
}
export function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>):
Observable<T> {
export function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>) {
if (isObservable(value)) {
return value;
}
@ -109,5 +108,5 @@ export function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>|
return from(Promise.resolve(value));
}
return of (value as T);
return of (value);
}