Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedgreen authored Aug 29, 2021
1 parent f866f3a commit fd6a6cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ declare global {
}

type litaral = string | number;
type NodeSet = Node | litaral | null | (Node | litaral | null)[];
type NodeSet = Node | litaral | null | false | (Node | litaral | null | false)[];

export interface Component<P = unknown> {
(props: P): NodeSet | Promise<NodeSet>;
}

interface Children {
children?: (Node | litaral | null)[];
children?: (Node | litaral | null | false)[];
}

// deno-lint-ignore no-explicit-any
Expand All @@ -31,7 +31,7 @@ export interface Node<P = any> {
export function h(
type: Component | string,
props?: { [prop: string]: unknown },
...children: (Node | litaral | null)[]
...children: (Node | litaral | null | false)[]
): JSX.Element {
return { type, props: { ...props, children } };
}
Expand Down

0 comments on commit fd6a6cf

Please sign in to comment.