import { InputText, MessageEntity, TextWithEntities } from '@mtcute/core'; import { default as Long } from 'long'; /** * Escape a string to be safely used in Markdown. * * > **Note**: this function is in most cases not needed, as `md` function * > handles all `string`s passed to it automatically as plain text. */ declare function escape(str: string): string; /** * Add Markdown formatting to the text given the plain text and entities contained in it. */ declare function unparse(input: InputText): string; export declare const md: { /** * Tagged template based Markdown-to-entities parser function * * Additionally, `md` function has two static methods: * - `md.escape` - escape a string to be safely used in Markdown * (should not be needed in most cases, as `md` function itself handles all `string`s * passed to it automatically as plain text) * - `md.unparse` - add Markdown formatting to the text given the plain text and entities contained in it * * @example * ```typescript * const text = md`**${user.displayName}**` * ``` */ (strings: TemplateStringsArray, ...sub: (InputText | MessageEntity | Long | boolean | number | undefined | null)[]): TextWithEntities; /** * A variant taking a plain JS string as input * and parsing it. * * Useful for cases when you already have a string * (e.g. from some server) and want to parse it. * * @example * ```typescript * const string = '**hello**' * const text = md(string) * ``` */ (string: string): TextWithEntities; escape: typeof escape; unparse: typeof unparse; }; export {};