-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
82 lines (72 loc) · 1.5 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import type {Program} from 'estree-jsx'
import type {Data as HastData, Literal as HastLiteral} from 'hast'
import type {Data as MdastData, Literal as MdastLiteral} from 'mdast'
export {mdxjsEsmFromMarkdown, mdxjsEsmToMarkdown} from './lib/index.js'
/**
* MDX ESM (import/export) node.
*/
export interface MdxjsEsm extends MdastLiteral {
/**
* Node type.
*/
type: 'mdxjsEsm'
/**
* Data associated with mdast MDX.js ESM.
*/
data?: MdxjsEsmData | undefined
}
/**
* Info associated with mdast MDX.js ESM nodes by the ecosystem.
*/
export interface MdxjsEsmData extends MdastData {
/**
* Program node from estree.
*/
estree?: Program | null | undefined
}
/**
* MDX ESM (import/export) node (for hast).
*/
export interface MdxjsEsmHast extends HastLiteral {
/**
* Node type.
*/
type: 'mdxjsEsm'
/**
* Data associated with hast MDX.js ESM.
*/
data?: MdxjsEsmHastData | undefined
}
/**
* Info associated with hast MDX.js ESM nodes by the ecosystem.
*/
export interface MdxjsEsmHastData extends HastData {
/**
* Program node from estree.
*/
estree?: Program | null | undefined
}
// Add nodes to mdast content.
declare module 'mdast' {
interface FrontmatterContentMap {
/**
* MDX ESM.
*/
mdxjsEsm: MdxjsEsm
}
interface RootContentMap {
/**
* MDX ESM.
*/
mdxjsEsm: MdxjsEsm
}
}
// Add nodes to hast content.
declare module 'hast' {
interface RootContentMap {
/**
* MDX ESM.
*/
mdxjsEsm: MdxjsEsmHast
}
}