UNPKG

easy-constructor

Version:

JavaScript class constructors without the boilerplate

9 lines (7 loc) 208 B
/** * Extracts the non-method properties of a class */ type ConstructorType<T> = { [K in keyof T as T[K] extends (...args: unknown[]) => unknown ? never : K]: T[K]; }; export type { ConstructorType };