coston / react-json-to-csv

A react button component to easily generate csv downloads of your json data. ✨
MIT License
56 stars 6 forks source link

Typescript support #95

Open hronchetti opened 2 years ago

hronchetti commented 2 years ago

Hey! Loving this simple package but I'm using TypeScript and the standard methods of:

npm i --save-dev @types/react-json-to-csv yarn add -D @types/react-json-to-csv

Return 'Not found'. Are there any plans to add a TypeScript declaration file?

coston commented 2 years ago

Hey @hronchetti, thanks for creating this issue. Yes, that's easily doable. Additionally, I plan to switch to building this package with typescript. This enhancement is something that I'll pickup when time permits, unless a community member would like to adopt the task first.

nui-tech commented 2 years ago

Hey guys, I've created a pull request for the type definition for this package. If you guys have some time, it would be good to have you guys review the pull request and potentially approve it? Cheers.

nui-tech commented 2 years ago

Hey guys, The type is up on the npm registry https://www.npmjs.com/package/@types/react-json-to-csv npm i --save-dev @types/react-json-to-csv

coston commented 2 years ago

Very nice, @nui-tech! Thank you for helping to support this project. 🎉

coston commented 2 years ago

I've added a typescript documentation to the docs.

📌 There is still opportunity to rewrite this package in TS, should someone want a project.