Skip to content

Commit

Permalink
fix(until): Add defaultIfEmpty.
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Jan 9, 2019
1 parent 046953f commit 8c68457
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/rules/rxjsNoUnsafeTakeuntilRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Walker extends Lint.ProgramAwareRuleWalker {

private allow: string[] = [
"count",
"defaultIfEmpty",
"endWith",
"every",
"finalize",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { of } from "rxjs";
import {
count,
defaultIfEmpty,
endWith,
every,
finalize,
Expand Down Expand Up @@ -28,6 +29,7 @@ const b = of("b");
let r: Observable<any>;

r = a.pipe(takeUntil(b), count()).subscribe();
r = a.pipe(takeUntil(b), defaultIfEmpty('empty')).subscribe();
r = a.pipe(takeUntil(b), endWith("z")).subscribe();
r = a.pipe(takeUntil(b), every(value => value !== "z")).subscribe();
r = a.pipe(takeUntil(b), finalize(() => {})).subscribe();
Expand Down

0 comments on commit 8c68457

Please sign in to comment.