Skip to content

Commit

Permalink
feat(filter): Observable<T>.filter() can take type guard as the predi…
Browse files Browse the repository at this point in the history
…cate function
  • Loading branch information
tetsuharuohzeki committed Sep 16, 2016
1 parent 36c7676 commit d62fbf0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/operator/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function filter<T>(predicate: (value: T, index: number) => boolean,

export interface FilterSignature<T> {
(predicate: (value: T, index: number) => boolean, thisArg?: any): Observable<T>;
<S extends T>(predicate: (value: T, index: number) => value is S, thisArg?: any): Observable<S>;
}

class FilterOperator<T> implements Operator<T, T> {
Expand Down

0 comments on commit d62fbf0

Please sign in to comment.