Skip to content

Commit 73feb37

Browse files
authored
fix(types): fix type inference issue of register method (#107)
1 parent 9fc54e8 commit 73feb37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ type Options =
4646
* const klass = register(PreactComponent, 'my-component');
4747
* ```
4848
*/
49-
export default function register(
50-
Component: AnyComponent,
49+
export default function register<P = {}, S = {}>(
50+
Component: AnyComponent<P, S>,
5151
tagName?: string,
5252
propNames?: string[],
5353
options?: Options

0 commit comments

Comments
 (0)