-
-
Notifications
You must be signed in to change notification settings - Fork 353
/
index.d.ts
55 lines (50 loc) · 1.68 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import type {Root} from 'mdast'
import type {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'
import type {Extension as MicromarkExtension} from 'micromark-util-types'
import type {Plugin} from 'unified'
import type {Options} from './lib/index.js'
export type {Options} from './lib/index.js'
/**
* Add support for parsing from markdown.
*
* @this
* Unified processor.
* @param
* Configuration (optional).
* @returns
* Nothing.
*/
declare const remarkParse: Plugin<
[(Readonly<Options> | null | undefined)?],
string,
Root
>
export default remarkParse
// Add custom settings supported when `remark-parse` is added.
declare module 'unified' {
interface Settings extends Options {}
interface Data {
/**
* List of `micromark` extensions to use.
*
* This type is registered by `remark-parse`.
* Values can be registered by remark plugins that extend `micromark` and
* `mdast-util-from-markdown`.
* See {@link MicromarkExtension | `Extension`} from
* {@link https://github.com/micromark/micromark/tree/main/packages/micromark-util-types | `micromark-util-types`}.
*/
micromarkExtensions?: MicromarkExtension[]
/**
* List of `mdast-util-from-markdown` extensions to use.
*
* This type is registered by `remark-parse`.
* Values can be registered by remark plugins that extend `micromark` and
* `mdast-util-from-markdown`.
* See {@link FromMarkdownExtension | `Extension`} from
* {@link https://github.com/syntax-tree/mdast-util-from-markdown#extension | `mdast-util-from-markdown`}.
*/
fromMarkdownExtensions?: Array<
FromMarkdownExtension[] | FromMarkdownExtension
>
}
}