UNPKG

telegram-markdown-v2

Version:

Convert markdown into Telegram Markdown V2 format with TypeScript support

13 lines (12 loc) 542 B
import type { Node } from 'unist'; import type { DefinitionsRecord } from './types.js'; /** * Fills the provided record with `Definition`s contained in the mdast. * They are keyed by identifier for subsequent `Reference` lookups. */ export declare function collectDefinitions(definitions: DefinitionsRecord): (tree: Node) => void; /** * Removes `Definition`s and their parent `Paragraph`s from the mdast. * This avoids unwanted negative space in stringified output. */ export declare function removeDefinitions(): (tree: Node) => void;