upstash / ratelimit-js

Rate limiting library for serverless runtimes
https://ratelimit-with-vercel-kv.vercel.app
MIT License
1.65k stars 33 forks source link

Export Duration type externally #118

Closed JoltCode closed 2 weeks ago

JoltCode commented 3 weeks ago

Export the Duration type https://github.com/upstash/ratelimit-js/blob/492fe7e864b8cff08857c1115d8fa4cfd7b2934e/src/duration.ts#L2 to the external exports, so it can be used when using the library, so you don't have to do Parameters<typeof Ratelimit.slidingWindow>[1] to access the type.

ogzhanolguncu commented 2 weeks ago

Thanks for pointing that out. We'll fix this ASAP.

JoltCode commented 2 weeks ago

Thanks so much 😄