File tree Expand file tree Collapse file tree 5 files changed +681
-622
lines changed
Expand file tree Collapse file tree 5 files changed +681
-622
lines changed Original file line number Diff line number Diff line change 66
77/* eslint-env browser */
88
9- // @ts -expect-error: hush .
9+ // @ts -expect-error: TS in VS Code doesn’t seem to infer this .
1010import * as hastscript from 'https://esm.sh/hastscript@7?dev'
1111
1212/** @type {typeof import('hastscript').h } */
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import type {Element} from 'hast'
1212 */
1313export type FunctionComponent < ComponentProps > = (
1414 props : ComponentProps
15- // eslint-disable-next-line @typescript-eslint/ban-types
1615) => JSX . Element | string | null | undefined
1716
1817/**
@@ -39,9 +38,12 @@ export type ClassComponent<ComponentProps> = new (
3938 * Props type.
4039 */
4140export type Component < ComponentProps > =
42- | FunctionComponent < ComponentProps >
4341 | ClassComponent < ComponentProps >
42+ | FunctionComponent < ComponentProps >
4443
44+ /**
45+ * Extra fields we pass.
46+ */
4547export type ExtraProps = { node ?: Element | undefined }
4648
4749/**
You can’t perform that action at this time.
0 commit comments