Skip to content

Commit

Permalink
fix(Component): generic params are now all optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sebkolind committed May 17, 2024
1 parent f4f1fc2 commit 1e27c68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type ComponentContext<S, A extends Attrs> = {
};

export type Attrs = {} | undefined;
export type Component<S extends {}, A extends Attrs = {}> = {
export type Component<S extends {} = {}, A extends Attrs = {}> = {
view: (context: ComponentContext<S, A>) => TentNode<A>;
state?: S;
mounted?: (context: ComponentContext<S, A>) => void;
Expand Down

0 comments on commit 1e27c68

Please sign in to comment.