UNPKG

ts-markdown

Version:

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

37 lines (36 loc) 1.14 kB
import { MarkdownRenderer } from '../rendering.types'; import { InlineTypes, MarkdownEntry } from '../shared.types'; /** * A markdown entry for generating h4 elements. */ export interface H4Entry extends MarkdownEntry { /** * The h4 contents and identifying property for the renderer. */ h4: InlineTypes; /** * Option which will append a markdown heading ID. * E.g., given the ID 'my-id' and the header 'Header Example', * `#### Header Example {#my-id}` */ id?: string; /** * Option which will arbitrarily append a string immediately below the h4, ignoring block-level settings. */ append?: string; } /** * The renderer for h4 entries. * * @param entry The h4 entry. * @param options Document-level render options. * @returns Block-level h4 markdown content. */ export declare const h4Renderer: MarkdownRenderer; /** * Helper which creates a fourth-level header entry. * * @param options Entry-level options for this element. * @returns a fourth-level header entry */ export declare function h4(content: H4Entry['h4'], options?: Omit<H4Entry, 'h4'>): H4Entry;