Skip to content

Commit

Permalink
fix(types): accept any generator method parameters
Browse files Browse the repository at this point in the history
Fixes #31.
  • Loading branch information
buschtoens committed Jan 16, 2019
1 parent 04de31c commit 1317061
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ type ExtractPropertyNamesOfType<T, S> = {
[K in keyof T]: T[K] extends S ? K : never
}[keyof T];

type GeneratorFn = () => IterableIterator<any>;
type GeneratorFn<Args extends any[] = any[]> = (
...args: Args
) => IterableIterator<any>;

type TaskMethodKeys<T> = ExtractPropertyNamesOfType<T, GeneratorFn>;
type EncapsulatedTaskKeys<T> = ExtractPropertyNamesOfType<
Expand Down

0 comments on commit 1317061

Please sign in to comment.