Skip to content

Commit bc7639c

Browse files
authored
fix(typescript): missing generic parameter of React.RefObject (#1536)
1 parent 90d6d72 commit bc7639c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

typings/index.d.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ type StateChangeFunction<Item> = (
109109

110110
export interface GetRootPropsOptions {
111111
refKey?: string
112-
ref?: React.RefObject
112+
ref?: React.RefObject<any>
113113
}
114114

115115
export interface GetRootPropsReturnValue {
116116
'aria-expanded': boolean
117117
'aria-haspopup': 'listbox'
118118
'aria-labelledby': string
119119
'aria-owns': string | undefined
120-
ref?: React.RefObject
120+
ref?: React.RefObject<any>
121121
role: 'combobox'
122122
}
123123

@@ -174,7 +174,7 @@ export interface GetMenuPropsOptions
174174

175175
export interface GetMenuPropsReturnValue {
176176
'aria-labelledby': string | undefined
177-
ref?: React.RefObject
177+
ref?: React.RefObject<any>
178178
role: 'listbox'
179179
id: string
180180
}
@@ -411,7 +411,7 @@ export interface UseSelectGetToggleButtonReturnValue
411411
'aria-haspopup': 'listbox'
412412
'aria-labelledby': string | undefined
413413
id: string
414-
ref?: React.RefObject
414+
ref?: React.RefObject<any>
415415
role: 'combobox'
416416
tabIndex: 0
417417
}
@@ -427,7 +427,7 @@ export interface UseSelectGetItemPropsOptions<Item>
427427
export interface UseSelectGetItemPropsReturnValue
428428
extends Omit<GetItemPropsReturnValue, 'onMouseDown'> {
429429
'aria-disabled': boolean
430-
ref?: React.RefObject
430+
ref?: React.RefObject<any>
431431
}
432432

433433
export interface UseSelectPropGetters<Item> {
@@ -603,7 +603,7 @@ export interface UseComboboxGetToggleButtonPropsReturnValue {
603603
id: string
604604
onPress?: (event: React.BaseSyntheticEvent) => void
605605
onClick?: React.MouseEventHandler
606-
ref?: React.RefObject
606+
ref?: React.RefObject<any>
607607
tabIndex: -1
608608
}
609609

@@ -619,7 +619,7 @@ export interface UseComboboxGetItemPropsOptions<Item>
619619
export interface UseComboboxGetItemPropsReturnValue
620620
extends GetItemPropsReturnValue {
621621
'aria-disabled': boolean
622-
ref?: React.RefObject
622+
ref?: React.RefObject<any>
623623
}
624624

625625
export interface UseComboboxGetInputPropsOptions
@@ -782,7 +782,7 @@ export interface UseMultipleSelectionGetSelectedItemPropsOptions<Item>
782782
}
783783

784784
export interface UseMultipleSelectionGetSelectedItemReturnValue {
785-
ref?: React.RefObject
785+
ref?: React.RefObject<any>
786786
tabIndex: 0 | -1
787787
onClick: React.MouseEventHandler
788788
onKeyDown: React.KeyboardEventHandler
@@ -794,7 +794,7 @@ export interface UseMultipleSelectionGetDropdownPropsOptions
794794
}
795795

796796
export interface UseMultipleSelectionGetDropdownReturnValue {
797-
ref?: React.RefObject
797+
ref?: React.RefObject<any>
798798
onClick?: React.MouseEventHandler
799799
onKeyDown?: React.KeyboardEventHandler
800800
}

0 commit comments

Comments
 (0)