import { Composer, Middleware, BaseScene, Telegraf } 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>; export type TelegrafOption = ConstructorParameters[1]; export type TelegrafLaunchOption = Parameters['launch']>[0];