markdown-it-async
Advanced tools
Comparing version
import MarkdownIt, { Options, PresetName } from 'markdown-it'; | ||
export { PluginSimple, PluginWithOptions, PluginWithParams } from 'markdown-it'; | ||
type PluginSimple = (md: MarkdownItAsync) => void; | ||
type PluginWithOptions<T = any> = (md: MarkdownItAsync, options?: T) => void; | ||
type PluginWithParams = (md: MarkdownItAsync, ...params: any[]) => void; | ||
interface MarkdownItAsyncOptions extends Omit<Options, 'highlight'> { | ||
@@ -20,2 +22,4 @@ /** | ||
constructor(options?: MarkdownItAsyncOptions); | ||
use(plugin: PluginSimple): this; | ||
use<T = any>(plugin: PluginWithOptions<T>, options?: T): this; | ||
renderAsync(src: string, env?: any): Promise<string>; | ||
@@ -27,2 +31,2 @@ } | ||
export { type MarkdownItASyncPlaceholderMap, MarkdownItAsync, type MarkdownItAsyncOptions, type MarkdownItAsyncOptions as Options, createMarkdownItAsync, createMarkdownItAsync as default, replaceAsync }; | ||
export { type MarkdownItASyncPlaceholderMap, MarkdownItAsync, type MarkdownItAsyncOptions, type MarkdownItAsyncOptions as Options, type PluginSimple, type PluginWithOptions, type PluginWithParams, createMarkdownItAsync, createMarkdownItAsync as default, replaceAsync }; |
{ | ||
"name": "markdown-it-async", | ||
"type": "module", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "_description_", | ||
@@ -6,0 +6,0 @@ "author": "Anthony Fu <anthonyfu117@hotmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
16452
9.98%190
13.1%