viro icon indicating copy to clipboard operation
viro copied to clipboard

Typescript support and possible solution

Open Hless opened this issue 6 years ago • 1 comments

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.

Hless avatar May 13 '19 10:05 Hless

I'm newbie in React world. Can you please brief how we can use these type definition files and use Viro in typescript project ?

SagarPanwala avatar Sep 19 '23 13:09 SagarPanwala