GatsbyCentral / gatsby-awesome-pagination

An opinionated, more awesome approach to pagination in Gatsby
MIT License
109 stars 27 forks source link

add typescript declaration #37

Closed ksjogo closed 4 years ago

chmac commented 4 years ago

@ksjogo Thanks for the PR. Were you able to automate the generation of typescript files from the flow code? When we wrote this we were using flow, but since have moved to typescript, so I'd also be happy to convert the codebase over. I guess in an ideal world we'd be able to maintain one typescript codebase and have the flow types auto generated from that. If you have any experience with tooling around this and could provide any pointers that would be great.

ksjogo commented 4 years ago

I used some tool to convert a flow code base to ts at some point in the past, but no further experience. Current version was hand extracted, as it seemed easy enough to do.

chmac commented 4 years ago

Thanks for the PR. I'd love to convert this whole library to typescript, we've moved away from flow since publishing this. I'm unwilling to merge this PR as it adds a maintenance cost that I'm not ready to take on. Feel free to publish the types to DefinitelyTyped, that would remove the maintenance load. Otherwise at some point I'll hopefully rewrite the whole package in typescript instead.