Skip to content

Commit

Permalink
remove-redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Oct 14, 2023
1 parent 1a9bf8a commit 5bd8853
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/typing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ export type Union<T extends any[]> = T[number];
// deno-lint-ignore no-explicit-any
export type AsyncFunction = (...args: any[]) => Promise<any>;

// deno-lint-ignore no-explicit-any
type IsAsync<F> = F extends AsyncFunction ? any : never;

export type AnyAsync<Functions> = Functions extends [infer f, ...infer rest]
? (IsAsync<f> | AnyAsync<rest>)
// deno-lint-ignore no-explicit-any
? f extends AsyncFunction ? any : AnyAsync<rest>
: never;

export type Unary<Input, Output> = (_: Input) => Output;
Expand Down

0 comments on commit 5bd8853

Please sign in to comment.