Skip to content

Commit 18d066b

Browse files
committed
fix(types): .use should also accept normal MarkdownIt plugins
1 parent ffb41ee commit 18d066b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Options, PresetName } from 'markdown-it'
22
import MarkdownIt from 'markdown-it'
33

4-
export type PluginSimple = (md: MarkdownItAsync) => void
5-
export type PluginWithOptions<T = any> = (md: MarkdownItAsync, options?: T) => void
6-
export type PluginWithParams = (md: MarkdownItAsync, ...params: any[]) => void
4+
export type PluginSimple = ((md: MarkdownItAsync) => void) | MarkdownIt.PluginSimple
5+
export type PluginWithOptions<T = any> = ((md: MarkdownItAsync, options?: T) => void) | MarkdownIt.PluginWithOptions<T>
6+
export type PluginWithParams = ((md: MarkdownItAsync, ...params: any[]) => void) | MarkdownIt.PluginWithParams
77

88
export interface MarkdownItAsyncOptions extends Omit<Options, 'highlight'> {
99
/**

0 commit comments

Comments
 (0)