@gramio/types - Code-generated Telegram Bot API types
import type { ApiMethods } from "@gramio/types"
type SendMessageReturn = ReturnType<ApiMethods["sendMessage"]>
Generate types
Prerequire - rust
- Clone this repo and open it
git clone https://github.com/kravetsone/gramio-types.git
- Clone repo to the
src
folder
git clone https://github.com/ark0f/tg-bot-api.git
- Run the JSON schema generator in the cloned folder
cargo run --package gh-pages-generator --bin gh-pages-generator -- dev
- Run types code-generation from the root of the project
bun generate
or, if you don't use bun
, use tsx
npx tsx src/index.ts
- Profit! Check out the types of Telegram Bot API in
types
folder!