-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TypeScript support #51
Comments
Hi @vahdet thanks for the suggestion. I have no experience with TypeScript (though it is of interest to me), so you may be better positioned to contribute a declaration file than me. If you make a PR for this, I can advise on the types and shape of the inputs/outputs. You probably don't even need to do the whole thing - if you get it started and help me get an idea of how to structure and publish a declaration file, I can probably fill in the missing definitions. |
@JamesBrill Well, yesterday I tinkered with the code indeed. I forked the repo applied my work on a new branch I won't be around for a couple of weeks, so I may react slower than today.. |
@vahdet @JamesBrill |
Thank you @OleksandrYehorov - that is hugely appreciated. 🙇 |
Firstly, thanks for the promising work!
In my case, the basic import (
import SpeechRecognition, { useSpeechRecognition } from 'react-speech-recognition'
) fails the TypeScript check with code ts(7016):And
npm install @types/react-speech-recognition
throws:So, I had to workaround it with adding this in my
app.d.ts file
:So, do you have any agenda for adding TypeScript support? If needed, I also may contribute at my best effort.
The text was updated successfully, but these errors were encountered: