ts-markdown
Version:
An extensible TypeScript markdown generator that takes JSON and creates a markdown document.
37 lines (36 loc) • 1.13 kB
TypeScript
import { MarkdownRenderer } from '../rendering.types';
import { InlineTypes, MarkdownEntry } from '../shared.types';
/**
* A markdown entry for generating h3 elements.
*/
export interface H3Entry extends MarkdownEntry {
/**
* The h3 contents and identifying property for the renderer.
*/
h3: 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 h3, ignoring block-level settings.
*/
append?: string;
}
/**
* The renderer for h3 entries.
*
* @param entry The h3 entry.
* @param options Document-level render options.
* @returns Block-level h3 markdown content.
*/
export declare const h3Renderer: MarkdownRenderer;
/**
* Helper which creates a third-level header entry.
*
* @param options Entry-level options for this element.
* @returns a third-level header entry
*/
export declare function h3(content: H3Entry['h3'], options?: Omit<H3Entry, 'h3'>): H3Entry;