Skip to content

Commit 287f581

Browse files
committed
fix: add types for react 19
The JSX namespace was moved to the react module.
1 parent 01f05da commit 287f581

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

frontend/elements/src/Elements.tsx

+15
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ declare global {
3737
}
3838
}
3939

40+
// React 19 and later
41+
declare module "react" {
42+
// eslint-disable-next-line no-unused-vars
43+
namespace JSX {
44+
// eslint-disable-next-line no-unused-vars
45+
interface IntrinsicElements {
46+
"hanko-auth": HankoAuthElementProps;
47+
"hanko-login": HankoAuthElementProps;
48+
"hanko-registration": HankoAuthElementProps;
49+
"hanko-profile": HankoProfileElementProps;
50+
"hanko-events": HankoEventsElementProps;
51+
}
52+
}
53+
}
54+
4055
export interface RegisterOptions {
4156
shadow?: boolean;
4257
injectStyles?: boolean;

0 commit comments

Comments
 (0)