Skip to content

Commit 92c1ebd

Browse files
committed
Refactor code-style
1 parent dcfb2c7 commit 92c1ebd

File tree

5 files changed

+681
-622
lines changed

5 files changed

+681
-622
lines changed

example/create-tree.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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.
1010
import * as hastscript from 'https://esm.sh/hastscript@7?dev'
1111

1212
/** @type {typeof import('hastscript').h} */

lib/components.d.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import type {Element} from 'hast'
1212
*/
1313
export 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
*/
4140
export type Component<ComponentProps> =
42-
| FunctionComponent<ComponentProps>
4341
| ClassComponent<ComponentProps>
42+
| FunctionComponent<ComponentProps>
4443

44+
/**
45+
* Extra fields we pass.
46+
*/
4547
export type ExtraProps = {node?: Element | undefined}
4648

4749
/**

0 commit comments

Comments
 (0)