We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 28a0835 + 1a7123a commit d3775acCopy full SHA for d3775ac
lib/interfaces/type.interface.ts
@@ -4,4 +4,10 @@ export interface Type<T = any> extends Function {
4
5
export type WithoutCallback<T extends any[]> =
6
// T extends any makes this distributive
7
- T extends any ? (T extends [...infer U, any] ? U : T) : never;
+ T extends any
8
+ ? T extends [...infer U, infer C]
9
+ ? C extends Function
10
+ ? U
11
+ : T
12
13
+ : never;
0 commit comments