* Calls a guard right away, but delivers a synchronous throw as an observable error so that * `prioritizedGuardValue` orders it with the other guards' results.
(guardFn: () => T | Promise<T> | Observable<T>)
| 259 | * `prioritizedGuardValue` orders it with the other guards' results. |
| 260 | */ |
| 261 | function callGuard<T>(guardFn: () => T | Promise<T> | Observable<T>): Observable<T> { |
| 262 | try { |
| 263 | return wrapIntoObservable(guardFn()); |
| 264 | } catch (e) { |
| 265 | return new Observable<T>((subscriber) => subscriber.error(e)); |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | function redirectIfUrlTree(urlSerializer: UrlSerializer): OperatorFunction<GuardResult, boolean> { |
| 270 | return pipe( |
no test coverage detected