-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
32 lines (28 loc) · 923 Bytes
/
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
import type {Element, Root} from 'hast'
export type {Options} from './lib/index.js'
export {default} from './lib/index.js'
interface InferDescriptionMeta {
/**
* Description of the document (optional, example: `'The city has changed
* drastically over the past 40 years, yet the M.T.A. map designed in 1979
* has largely endured.'`).
*
* Inferred by `rehype-infer-description-meta` from HTML.
* Used by `rehype-meta`.
*/
description?: string | null | undefined
/**
* Description of this document, in hast tree form (optional).
*
* Inferred by `rehype-infer-description-meta` from HTML.
* Used by `rehype-meta`.
*/
descriptionHast?: Root | Element | null | undefined
}
// Add custom data supported when `rehype-infer-description-meta` is added.
declare module 'vfile' {
interface DataMapMeta extends InferDescriptionMeta {}
interface DataMap {
meta: DataMapMeta
}
}