import { DecodeTextOptions } from "byte-codec"; //#region src/markdown/text.d.ts /** * Decodes markdown bytes to text, working the character encoding out from the bytes. * @param bytes - The markdown bytes. * @param options - An explicit `encoding` to decode under, skipping detection. Reach for it when the bytes are in an encoding detection cannot see, a mark-less UTF-16 file holding CJK text being the case that occurs. * @throws MarkdownUndecodableTextError When the bytes are not text, or match none of the supported encodings. * @returns The markdown text. */ declare function decodeMarkdownText(bytes: Uint8Array, options?: DecodeTextOptions): string; /** * Encodes markdown text as UTF-8 bytes. * @param text - The markdown text. * @returns The UTF-8 bytes, whatever encoding the text was originally decoded from. */ declare function encodeMarkdownText(text: string): Uint8Array; //#endregion export { decodeMarkdownText, encodeMarkdownText };