pi0 / nitro-cloudflare-dev

POC module to enable access to the Cloudflare runtime bindings in development server of Nitro and Nuxt
MIT License
62 stars 2 forks source link

feat: generic types for PlatformProxy #13

Closed Aslemammad closed 3 months ago

Aslemammad commented 3 months ago

Resolves https://twitter.com/_pi0_/status/1770360519435620482

Adding two new interfaces that can be modified by the users.

declare module 'nitro-cloudflare-dev' {
  interface Env {
    PKGS: R2Bucket
  }
}
pi0 commented 3 months ago

Thanks for the idea @Aslemammad and legendary @dario-piotrowicz for all your help you are amazing! Let's track with https://github.com/cloudflare/workerd/issues/1899 then it is probably best to respect upstream types for consistency.