refactor(router): remove type casting from wrapIntoObservable private function (#26521)
PR Close #26521
This commit is contained in:
parent
6712492dc2
commit
17586f1e94
|
@ -96,8 +96,7 @@ export function andObservables(observables: Observable<Observable<any>>): Observ
|
||||||
return observables.pipe(mergeAll(), every((result: any) => result === true));
|
return observables.pipe(mergeAll(), every((result: any) => result === true));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>):
|
export function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>| Observable<T>) {
|
||||||
Observable<T> {
|
|
||||||
if (isObservable(value)) {
|
if (isObservable(value)) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -109,5 +108,5 @@ export function wrapIntoObservable<T>(value: T | NgModuleFactory<T>| Promise<T>|
|
||||||
return from(Promise.resolve(value));
|
return from(Promise.resolve(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
return of (value as T);
|
return of (value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue