Skip to content

Commit

Permalink
refactor(Observable.if): remove ts hacks from Observable
Browse files Browse the repository at this point in the history
BREAKING CHANGE: TypeScript users using `Observable.if` will have to cast `Observable` as any to get to `if`. It is a better idae to just use `iif` directly via `import { iif } from 'rxjs';`
  • Loading branch information
benlesh committed Mar 2, 2018
1 parent d3e0728 commit f46f261
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/add/observable/if.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Observable } from '../../internal/Observable';
import { iif } from '../../internal/observable/iif';

Observable.if = iif;
//tslint:disable-next-line:no-any TypeScript doesn't like `if`
(Observable as any).if = iif;

0 comments on commit f46f261

Please sign in to comment.