ts-markdown
Version:
An extensible TypeScript markdown generator that takes JSON and creates a markdown document.
27 lines (26 loc) • 903 B
TypeScript
import { MarkdownRenderer } from '../rendering.types';
import { RichTextEntry, MarkdownEntry } from '../shared.types';
/**
* A markdown entry for generating highlighted text.
*/
export interface HighlightEntry extends MarkdownEntry, RichTextEntry {
/**
* The highlighted contents and identifying property for the renderer.
*/
highlight: RichTextEntry;
}
/**
* The renderer for highlight entries.
*
* @param entry The highlight entry.
* @param options Document-level render options.
* @returns Hihglighted text markdown content.
*/
export declare const highlightRenderer: MarkdownRenderer;
/**
* Helper which creates a highlighted text entry.
*
* @param options Entry-level options for this element.
* @returns a highlighted text entry
*/
export declare function highlight(content: HighlightEntry['highlight'], options?: Omit<HighlightEntry, 'highlight'>): HighlightEntry;