1 | import { User } from '@telegraf/types';
|
2 | import { FmtString } from './core/helpers/formatting';
|
3 | export { FmtString };
|
4 | type Nestable<Kind extends string> = string | number | boolean | FmtString<Kind>;
|
5 | type Nesting<Kind extends string> = [
|
6 | parts: Nestable<Kind> | readonly Nestable<Kind>[],
|
7 | ...items: Nestable<Kind>[]
|
8 | ];
|
9 | type Nests<Is extends string, Kind extends string> = (...args: Nesting<Kind>) => FmtString<Is>;
|
10 | export declare const join: Nests<"fmt", string>;
|
11 | export declare const fmt: Nests<"fmt", string>;
|
12 | export declare const bold: Nests<"bold", "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "fmt">;
|
13 | export declare const italic: Nests<"italic", "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "fmt">;
|
14 | export declare const spoiler: Nests<"spoiler", "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "fmt">;
|
15 | export declare const strikethrough: Nests<"strikethrough", "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "fmt">;
|
16 | export declare const underline: Nests<"underline", "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "fmt">;
|
17 | export declare const quote: Nests<"blockquote", "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "code" | "fmt">;
|
18 | export declare const code: Nests<"code", never>;
|
19 | export declare const pre: (language: string) => Nests<"pre", never>;
|
20 | export declare const link: (content: Nestable<'fmt' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'spoiler' | 'code'>, url: string) => FmtString<"text_link">;
|
21 | export declare const mention: (name: Nestable<'fmt' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'spoiler' | 'code'>, user: number | User) => FmtString<"text_link"> | FmtString<"text_mention">;
|
22 |
|
\ | No newline at end of file |