-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.d.ts
63 lines (51 loc) · 1.54 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
// Minimum TypeScript Version: 3.2
import {Plugin} from 'unified'
import {Node} from 'unist'
declare namespace remarkFrontmatter {
type Frontmatter = Plugin<[RemarkFrontmatterOptions?]>
type Preset = 'yaml' | 'toml'
interface Fence {
open: string
close: string
}
interface Matter {
/**
* Node type to parse to in [mdast](https://github.com/syntax-tree/mdast) and compile from.
*/
type: string
/**
* Character used to construct fences.
* By providing an object with `open` and `close`.
* different characters can be used for opening and closing fences.
* For example the character `'-'` will result in `'---'` being used as the
* fence.
*/
marker?: string | Fence
/**
* String used as the complete fence.
* By providing an object with `open` and `close` different values can be used
* for opening and closing fences.
* This can be used too if fences contain different characters or lengths other
* than 3
*/
fence?: string | Fence
/**
* if `true`, matter can be found anywhere in the document.
* If `false` (default), only matter at the start of the document is recognized
*
* @default false
*/
anywhere?: boolean
}
type RemarkFrontmatterOptions = Array<Preset | Matter>
interface YamlNode extends Node {
type: 'yaml'
value: string
}
interface TomlNode extends Node {
type: 'toml'
value: string
}
}
declare const remarkFrontmatter: remarkFrontmatter.Frontmatter
export = remarkFrontmatter