declare type FunctionKeys = { [K in keyof T]: T[K] extends Function ? K : never; }[keyof T]; declare class Dispatcher, P = Parameters> { protected readonly method: K; constructor(method: K); call1(obj: T, ...p: [P]): void; call2(obj: T, p: P): void; } interface TestInterface { methodToCall: (str: string, num: number) => void; } declare class TestClass implements TestInterface { methodToCall(str: string, num: number): void; } declare const instance: TestClass; declare const dispatcher: Dispatcher;