forked from remix-run/remix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unist.d.ts
62 lines (50 loc) · 1.14 KB
/
unist.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
import type { Parent, Literal } from "unist";
export type Node = FlowNode | PhrasingNode | RootNode;
export interface RootNode extends Parent {
type: "root";
children: FlowNode[];
}
export type PhrasingNode = TextNode | EmphasisNode;
export type FlowNode =
| BlockquoteNode
| HeadingNode
| ParagraphNode
| LinkNode
| PreNode
| CodeNode;
export interface BlockquoteNode extends Parent {
type: "blockquote";
children: FlowNode[];
}
export interface HeadingNode extends Parent {
type: "heading";
depth: number;
children: PhrasingNode[];
}
export interface ParagraphNode extends Parent {
type: "paragraph";
children: PhrasingNode[];
}
export interface PreNode extends Parent {
type: "pre";
children: PhrasingNode[];
}
export interface CodeNode extends Parent {
type: "code";
children: PhrasingNode[];
value?: string;
meta?: string | string[];
}
export interface EmphasisNode extends Parent {
type: "emphasis";
children: PhrasingNode[];
}
export interface LinkNode extends Parent {
type: "link";
children: FlowNode[];
url?: string;
}
export interface TextNode extends Literal {
type: "text";
value: string;
}