UNPKG

ts-markdown

Version:

An extensible TypeScript markdown generator that takes JSON and creates a markdown document.

31 lines (30 loc) 941 B
import { MarkdownRenderer } from '../rendering.types'; import { MarkdownEntry, RichTextEntry } from '../shared.types'; /** * A markdown entry for generating bolded text. */ export interface BoldEntry extends MarkdownEntry, RichTextEntry { /** * The bold text contents and identifying properyt for the renderer. */ bold: RichTextEntry; /** * The character which will be used to signify bolded text. */ indicator?: '*' | '_'; } /** * The renderer for bold entries. * * @param entry The renderer for bolded entries. * @param options Document-level render options. * @returns Bolded markdown content. */ export declare const boldRenderer: MarkdownRenderer; /** * Helper which creates a bold text entry. * * @param options Entry-level options for this element. * @returns a bold text entry */ export declare function bold(content: BoldEntry['bold'], options?: Omit<BoldEntry, 'bold'>): BoldEntry;