MCPcopy Create free account
hub / github.com/angular/angular / guard3

Function guard3

packages/router/test/integration/guards.spec.ts:2527–2531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2525 );
2526 const guard2: CanActivateFn = () => of(true).pipe(tap(() => guardDone.push('guard2')));
2527 const guard3: CanActivateFn = () =>
2528 of(true).pipe(
2529 switchMap((v) => new Promise((r) => setTimeout(r, 2)).then(() => v)),
2530 tap(() => guardDone.push('guard3')),
2531 );
2532 const guard4: CanActivateFn = () =>
2533 of(true).pipe(
2534 switchMap((v) => new Promise((r) => setTimeout(r, 6)).then(() => v)),

Callers

nothing calls this directly

Calls 3

setTimeoutFunction · 0.85
thenMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected