UNPKG

ts-markdown

Version:

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

36 lines (35 loc) 1.03 kB
import { MarkdownRenderer } from '../rendering.types'; import { MarkdownEntry } from '../shared.types'; /** * A markdown entry for generating links. */ export interface LinkEntry extends MarkdownEntry { /** * The link settings and identifying property for the renderer. */ link: { /** * The hypertext reference to the target resource. */ href: string; /** * Hyperlink text to show for the link itself. * When not provided, the href will be rendered as an auto-link. * E.g., `<https://www.google.com>` */ text?: string; /** * A title for the link. Ignored for links without text. */ title?: string; }; } /** * The renderer for link entries. * * @param entry The link entry. * @param options Document-level render options. * @returns Link markdown content. */ export declare const linkRenderer: MarkdownRenderer; export declare function link(settings: LinkEntry['link']): LinkEntry;