import { Composer, Middleware, 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 LaunchOptions = Parameters[0]; export type TelegrafOptions = ConstructorParameters[1];