viro
viro copied to clipboard
Typescript support and possible solution
I needed typescript support, but as suggested by issue #557 there were no plans to support this. However I have gone ahead and built a node script that exports typescript defintions from the declared PropTypes.
I use this script for my own app, but decided to release it in a repository so that other can benefit too, repo is here: https://github.com/citychallenge/react-viro-to-dts
Typescript defintions are here: https://github.com/citychallenge/react-viro-to-dts/blob/master/%40types/react-viro/index.d.ts
Perhaps it's an idea to expand upon this code and include it as part the build process for react-viro? The definitions files can be exported to DefinitelyTyped for example.
I'm newbie in React world. Can you please brief how we can use these type definition files and use Viro in typescript project ?