-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Hello, there seems to be some typing issues in versions 3.0 and upwards. When I try to use your component through ref I get this
'AnnounceKit' refers to a value, but is being used as a type here. Did you mean 'typeof AnnounceKit'?
After changing it to const ref = React.createRef<typeof AnnounceKit>(); it seems that all the typing which were available in versions up to version 3 is gone Property 'open' does not exist on type 'ForwardRefExoticComponent<AnnounceKitProps & RefAttributes<unknown>>'.ts(2339).
It seems to me that this part in your declaration file declare const _default: React.ForwardRefExoticComponent<AnnounceKitProps & React.RefAttributes<unknown>>; export default _default; seems to be the problem. Shouldn't React.RefAttributes<unknown> have something else casted other than unknown or am I just using your library wrong? I've followed your readme available in this repo.
Thank you for your help.