Skip to content

Commit

Permalink
use better return type for withFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Rinehart authored and NeoPhi committed Oct 6, 2017
1 parent 1995496 commit 6a0d5d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/with-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { $$asyncIterator } from 'iterall';
export type FilterFn = (rootValue?: any, args?: any, context?: any, info?: any) => boolean;
export type ResolverFn = (rootValue?: any, args?: any, context?: any, info?: any) => AsyncIterator<any>;

export const withFilter = (asyncIteratorFn: ResolverFn, filterFn: FilterFn): Function => {
export const withFilter = (asyncIteratorFn: ResolverFn, filterFn: FilterFn): ResolverFn => {
return (rootValue: any, args: any, context: any, info: any): AsyncIterator<any> => {
const asyncIterator = asyncIteratorFn(rootValue, args, context, info);

Expand Down

0 comments on commit 6a0d5d5

Please sign in to comment.