fix: type signature of Component too narrow
This commit is contained in:
parent
8dd0fb94e9
commit
cbd80f381c
4 changed files with 23 additions and 7 deletions
|
|
@ -37,9 +37,7 @@ export type Element =
|
|||
/**
|
||||
* Custom HTMLElement factory that can be parameterized by props.
|
||||
*/
|
||||
export interface Component<
|
||||
P extends Record<string, unknown> = Record<string, never>
|
||||
> {
|
||||
export interface Component<P extends object = {}> {
|
||||
(
|
||||
props: P & {
|
||||
children?: Element[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue