From 6a0d5d582b28ca27555328a5295ce3a139830656 Mon Sep 17 00:00:00 2001 From: Daniel Rinehart Date: Fri, 6 Oct 2017 10:03:50 -0400 Subject: [PATCH] use better return type for withFilter --- src/with-filter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/with-filter.ts b/src/with-filter.ts index aba39bb..d57ef6c 100644 --- a/src/with-filter.ts +++ b/src/with-filter.ts @@ -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; -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 => { const asyncIterator = asyncIteratorFn(rootValue, args, context, info);