Skip to content

Commit 027b450

Browse files
committed
chore: Type static properties
1 parent 6fabf0a commit 027b450

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.d.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import { AnyComponent } from 'preact';
22

3+
type StaticProperties<P> = {
4+
tagName?: string;
5+
observedAttributes?: (keyof P)[];
6+
propTypes?: Record<keyof P, any>;
7+
formAssociated?: boolean;
8+
};
9+
310
type Options =
411
| {
512
shadow: false;
@@ -41,7 +48,7 @@ type Options =
4148
* ```
4249
*/
4350
declare function register<P = {}, S = {}>(
44-
Component: AnyComponent<P, S>,
51+
Component: AnyComponent<P, S> & StaticProperties<P>,
4552
tagName?: string,
4653
propNames?: (keyof P)[],
4754
options?: Options

0 commit comments

Comments
 (0)