markdown-it-async
Advanced tools
Comparing version
@@ -1,6 +0,6 @@ | ||
import MarkdownIt, { PluginSimple as PluginSimple$1, PluginWithOptions as PluginWithOptions$1, PluginWithParams as PluginWithParams$1, Options, PresetName } from 'markdown-it'; | ||
import MarkdownIt, { Options, PresetName, PluginSimple as PluginSimple$1, PluginWithOptions as PluginWithOptions$1, PluginWithParams as PluginWithParams$1 } from 'markdown-it'; | ||
type PluginSimple = ((md: MarkdownItAsync) => void) | PluginSimple$1; | ||
type PluginWithOptions<T = any> = ((md: MarkdownItAsync, options?: T) => void) | PluginWithOptions$1<T>; | ||
type PluginWithParams = ((md: MarkdownItAsync, ...params: any[]) => void) | PluginWithParams$1; | ||
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'> { | ||
@@ -17,10 +17,15 @@ /** | ||
type MarkdownItASyncPlaceholderMap = Map<string, [promise: Promise<string>, str: string, lang: string, attrs: string]>; | ||
type MarkdownItAsyncPlaceholderMap = Map<string, [promise: Promise<string>, str: string, lang: string, attrs: string]>; | ||
declare class MarkdownItAsync extends MarkdownIt { | ||
// @ts-ignore | ||
options: MarkdownItAsyncOptions | ||
map: MarkdownItASyncPlaceholderMap; | ||
placeholderMap: MarkdownItAsyncPlaceholderMap; | ||
constructor(presetName: PresetName, options?: MarkdownItAsyncOptions); | ||
constructor(options?: MarkdownItAsyncOptions); | ||
use(plugin: PluginSimple): this; | ||
use(plugin: PluginSimple$1): this; | ||
use<T = any>(plugin: PluginWithOptions<T>, options?: T): this; | ||
use<T = any>(plugin: PluginWithOptions$1<T>, options?: T): this; | ||
use(plugin: PluginWithParams, ...params: any[]): this; | ||
use(plugin: PluginWithParams$1, ...params: any[]): this; | ||
renderAsync(src: string, env?: any): Promise<string>; | ||
@@ -32,2 +37,2 @@ } | ||
export { type MarkdownItASyncPlaceholderMap, MarkdownItAsync, type MarkdownItAsyncOptions, type MarkdownItAsyncOptions as Options, type PluginSimple, type PluginWithOptions, type PluginWithParams, createMarkdownItAsync, createMarkdownItAsync as default, replaceAsync }; | ||
export { MarkdownItAsync, type MarkdownItAsyncOptions, type MarkdownItAsyncPlaceholderMap, type MarkdownItAsyncOptions as Options, type PluginSimple, type PluginWithOptions, type PluginWithParams, createMarkdownItAsync, createMarkdownItAsync as default, replaceAsync }; |
{ | ||
"name": "markdown-it-async", | ||
"type": "module", | ||
"version": "1.1.3", | ||
"version": "1.2.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
18104
4.36%198
3.66%