ts-markdown-builder
Version:
Elegant markdown builder with minimal bundle size.
45 lines (44 loc) • 1.02 kB
TypeScript
/**
* Create an italic text.
*
* Markdown: `*text*`
*
* @param text - The text to be italicized.
*/
export declare function italic(text: string): string;
/**
* Create a bold text.
*
* Markdown: `**text**`
*
* @param text - The text to be bolded.
*/
export declare function bold(text: string): string;
/**
* Create a code text.
*
* Markdown: `code`
*
* @param text - The text to be marked as code.
*/
export declare function code(text: string): string;
/**
* Create a link or autolink span.
*
* Markdown:
* - `[text](url)` link when `text` is provided
* - `<url>` autolink when `text` is not provided
*
* @param url - The URL to be linked.
* @param text - The title for the link (optional).
*/
export declare function link(url: string, text?: string): string;
/**
* Create an image text.
*
* Markdown: ``
*
* @param url - The URL of the image.
* @param text - The description for the image (optional).
*/
export declare function image(url: string, text?: string): string;