1 | import { ForceReply, InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove } from './core/types/typegram';
|
2 | declare type Hideable<B> = B & {
|
3 | hide?: boolean;
|
4 | };
|
5 | declare type HideableKBtn = Hideable<KeyboardButton>;
|
6 | declare type HideableIKBtn = Hideable<InlineKeyboardButton>;
|
7 | export declare class Markup<T extends InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply> {
|
8 | readonly reply_markup: T;
|
9 | constructor(reply_markup: T);
|
10 | selective<T extends ForceReply | ReplyKeyboardMarkup>(this: Markup<T>, value?: boolean): Markup<T>;
|
11 | placeholder<T extends ForceReply | ReplyKeyboardMarkup>(this: Markup<T>, placeholder: string): Markup<T>;
|
12 | resize(this: Markup<ReplyKeyboardMarkup>, value?: boolean): Markup<ReplyKeyboardMarkup>;
|
13 | oneTime(this: Markup<ReplyKeyboardMarkup>, value?: boolean): Markup<ReplyKeyboardMarkup>;
|
14 | }
|
15 | export * as button from './button';
|
16 | export declare function removeKeyboard(): Markup<ReplyKeyboardRemove>;
|
17 | export declare function forceReply(): Markup<ForceReply>;
|
18 | export declare function keyboard(buttons: HideableKBtn[][]): Markup<ReplyKeyboardMarkup>;
|
19 | export declare function keyboard(buttons: HideableKBtn[], options?: Partial<KeyboardBuildingOptions<HideableKBtn>>): Markup<ReplyKeyboardMarkup>;
|
20 | export declare function inlineKeyboard(buttons: HideableIKBtn[][]): Markup<InlineKeyboardMarkup>;
|
21 | export declare function inlineKeyboard(buttons: HideableIKBtn[], options?: Partial<KeyboardBuildingOptions<HideableIKBtn>>): Markup<InlineKeyboardMarkup>;
|
22 | interface KeyboardBuildingOptions<B extends HideableKBtn | HideableIKBtn> {
|
23 | wrap?: (btn: B, index: number, currentRow: B[]) => boolean;
|
24 | columns: number;
|
25 | }
|
26 |
|
\ | No newline at end of file |