Skip to content

Commit dc55595

Browse files
authored
Fix type error for consumers on @types/react v19 (#409)
React.ReactText was removed from @types/react v19. It was an alias for string | number, so substitute the underlying types directly so the SubMenuProps.title declaration keeps compiling against both v18 and v19.
1 parent 2242b02 commit dc55595

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ declare module "@firefox-devtools/react-contextmenu" {
4848
}
4949

5050
export interface SubMenuProps {
51-
title: React.ReactElement<any> | React.ReactText,
51+
title: React.ReactElement<any> | string | number,
5252
attributes?: React.HTMLAttributes<HTMLDivElement>,
5353
className?: string,
5454
disabled?: boolean,

0 commit comments

Comments
 (0)