1 | import type {ComponentType} from 'react'
|
2 | import type {Element} from 'hast'
|
3 |
|
4 | interface WithNode {
|
5 | node: Element
|
6 | }
|
7 |
|
8 | export interface ComponentsWithNodeOptions {
|
9 | |
10 |
|
11 |
|
12 | passNode: true
|
13 | |
14 |
|
15 |
|
16 |
|
17 | components?: Partial<
|
18 | {
|
19 | [TagName in keyof JSX.IntrinsicElements]:
|
20 | | keyof JSX.IntrinsicElements
|
21 | | ComponentType<WithNode & JSX.IntrinsicElements[TagName]>
|
22 | }
|
23 | >
|
24 | }
|
25 |
|
26 | export interface ComponentsWithoutNodeOptions {
|
27 | |
28 |
|
29 |
|
30 | passNode?: false | undefined
|
31 |
|
32 | |
33 |
|
34 |
|
35 |
|
36 | components?: Partial<
|
37 | {
|
38 | [TagName in keyof JSX.IntrinsicElements]:
|
39 | | keyof JSX.IntrinsicElements
|
40 | | ComponentType<JSX.IntrinsicElements[TagName]>
|
41 | }
|
42 | >
|
43 | }
|