All files / src/rx waitForType.ts

33.33% Statements 1/3
100% Branches 0/0
0% Functions 0/2
50% Lines 1/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8          1x    
import { take } from 'rxjs/operators';
import { ofType } from './ofType';
import { Observable } from 'rxjs';
import { AC, Action } from '../types';
 
export const waitForType = <T extends AC>(ac: T) => (obs: Observable<Action>) =>
  obs.pipe(ofType(ac), take(1));