TypeScript types for the Telegram Bot API. Fork of @telegraf/types with Bot API 9.5 support.
Zero executable code.
npm install --save-dev @plvxn/tgraf-typesThe package exposes interfaces that correspond to types used throughout the Telegram Bot API. Types like Update, Message, CallbackQuery, Chat, etc. are represented as unions for type narrowing.
The API wraps responses in an object with ok: boolean. This is modelled by the ApiResponse type.
import * as Telegram from "@plvxn/tgraf-types";
type API = Telegram.ApiMethods<MyInputFile>;
type Opts<M extends keyof API> = Telegram.Opts<MyInputFile>[M];
type Ret<M extends keyof API> = Telegram.Ret<MyInputFile>[M];Written for Deno, built for Node. npm prepare runs deno2node.
Fork of @telegraf/types. Originally from Typegram.