Skip to content

Commit

Permalink
refactor(router): remove type casting from wrapIntoObservable private…
Browse files Browse the repository at this point in the history
… function (#26521)

PR Close #26521
  • Loading branch information
jasonaden authored and matsko committed Oct 31, 2018
1 parent 6712492 commit 17586f1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/router/src/utils/collection.ts
Expand Up @@ -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;
}
Expand All @@ -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);
}

0 comments on commit 17586f1

Please sign in to comment.