We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc54649 commit 1cd312dCopy full SHA for 1cd312d
1 file changed
class.ts
@@ -49,7 +49,8 @@ export type Class<C extends object = {}> =
49
* @returns Class type or never.
50
*/
51
export type IsClass<T, C extends object = {}> = T extends
52
- (Omit<Function, 'length' | 'name'> & { prototype: object } & C)
53
- ? (T extends (abstract new (...args: any[]) => any) ? T
+ (Omit<Function, 'apply' | 'call' | 'length' | 'name'> & {
+ prototype: object;
54
+ } & C) ? (T extends (abstract new (...args: any[]) => any) ? T
55
: (T extends ((...args: any[]) => any) ? never : T))
56
: never;
0 commit comments