ts-markdown
Version:
An extensible TypeScript markdown generator that takes JSON and creates a markdown document.
26 lines (25 loc) • 1.24 kB
TypeScript
import { RenderOptions, MarkdownRenderResult, MarkdownEntryOrPrimitive } from './rendering.types';
/**
* The main entrypoint into rendering documents in **ts-markdown**.
*
* @param data The markdown entries which should be rendered into a markdown document.
* @param options Document-level options which can affect broad aspects of the rendering process.
* @returns A string of markdown.
*/
export declare function tsMarkdown(data: MarkdownEntryOrPrimitive[], options?: RenderOptions): string;
/**
* Reduces an array of markdown entries to a single string.
*
* @param data the markdown entries to process.
* @param options Document-level options which can affect broad aspects of the rendering process.
* @returns a string of markdown content.
*/
export declare function renderEntries(data: MarkdownEntryOrPrimitive[], options: RenderOptions): string;
/**
* Reduces a single markdown entry to a string of markdown content.
*
* @param entry the target markdown entry or string of text.
* @param options Document-level options which can affect broad aspects of the rendering process.
* @returns
*/
export declare function getMarkdownString(entry: MarkdownEntryOrPrimitive, options: RenderOptions): MarkdownRenderResult;