typescript-type
Version:
Typescript type
12 lines (8 loc) • 358 B
text/typescript
export type ClassAttributeNames<T> = {
[K in keyof T]: T[K] extends (args: any) => any ? never : K
}[keyof T];
export type ClassAttributes<T> = Pick<T, ClassAttributeNames<T>>;
export type ClassFunctionNames<T> = {
[K in keyof T]: T[K] extends (args: any) => any ? K : never
}[keyof T];
export type ClassFunctions<T> = Pick<T, ClassFunctionNames<T>>;