import { BaseScene, Composer, Middleware } from 'telegraf'; export type Filter = T extends [] ? [] : T extends [infer Head, ...infer Tail] ? Head extends F ? Filter : [Head, ...Filter] : []; export type OnlyFunctionPropertyNames = { [K in keyof T]: T[K] extends (...args: any) => any ? K : never; }[keyof T]; export type ComposerMethodArgs< T extends Composer, U extends OnlyFunctionPropertyNames = OnlyFunctionPropertyNames > = Filter, Middleware>; export type UpdateMethods = OnlyFunctionPropertyNames>; export type SceneMethods = OnlyFunctionPropertyNames>;