/** * @module * * This module contains type-utils for convenient work * * @example import utils * ```typescript * import { APIMethodParams, APIMethodReturn } from "@gramio/types/utils"; * * type SendMessageReturn = APIMethodReturn<"sendMessage">; * // ^? type SendMessageReturn = TelegramMessage" * type SendMessageParams = APIMethodParams<"sendMessage">; * // ^? type SendMessageParams = SendMessageParams" * ``` * * Based on Bot API v10.4 (09.11.2026) * * Generated at 09.11.2026, 13:21:57 using [types](https://github.com/gramiojs/types) and [schema](https://github.com/gramiojs/schema-parser) generators */ import type { APIMethods } from "./methods" export type CallAPI = (params: T) => Promise export type CallAPIWithoutParams = () => Promise export type CallAPIWithOptionalParams = (params?: T) => Promise /** * @example * ```typescript * type SendMessageParams = APIMethodParams<"sendMessage">; * // ^? type SendMessageParams = SendMessageParams" * ``` */ export type APIMethodParams = Parameters< APIMethods[APIMethod] >[0] /** * @example * ```typescript * type SendMessageReturn = APIMethodReturn<"sendMessage">; * // ^? type SendMessageReturn = TelegramMessage" * ``` */ export type APIMethodReturn = Awaited< ReturnType >