File tree 5 files changed +681
-622
lines changed
5 files changed +681
-622
lines changed Original file line number Diff line number Diff line change 6
6
7
7
/* eslint-env browser */
8
8
9
- // @ts -expect-error: hush .
9
+ // @ts -expect-error: TS in VS Code doesn’t seem to infer this .
10
10
import * as hastscript from 'https://esm.sh/hastscript@7?dev'
11
11
12
12
/** @type {typeof import('hastscript').h } */
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import type {Element} from 'hast'
12
12
*/
13
13
export type FunctionComponent < ComponentProps > = (
14
14
props : ComponentProps
15
- // eslint-disable-next-line @typescript-eslint/ban-types
16
15
) => JSX . Element | string | null | undefined
17
16
18
17
/**
@@ -39,9 +38,12 @@ export type ClassComponent<ComponentProps> = new (
39
38
* Props type.
40
39
*/
41
40
export type Component < ComponentProps > =
42
- | FunctionComponent < ComponentProps >
43
41
| ClassComponent < ComponentProps >
42
+ | FunctionComponent < ComponentProps >
44
43
44
+ /**
45
+ * Extra fields we pass.
46
+ */
45
47
export type ExtraProps = { node ?: Element | undefined }
46
48
47
49
/**
You can’t perform that action at this time.
0 commit comments