react-papaparse
react-papaparse copied to clipboard
Fix typescript type
Maybe a silly question, but is this to fix the fact that typing doesn't seem to be working right now? Definitely missing this...
Are you planning to add exports to all the related types, not only for main declarations?
In my case I use readString and to type Error properly in my react state I had to write such a cumbersome thing:
type ParseError = Parameters<
Parameters<ReturnType<typeof usePapaParse>['readString']>[1]['complete']
>[0]['errors'][number];
ofc that works for now, however (apart from the fact this is very odd chunk of code :)) I have absolutely no guarantee that signature will not change in future versions
would be really good to just import that type from react-papaparse module