Skip to content

Conversation

@swalker326
Copy link

@swalker326 swalker326 commented Dec 16, 2025

The cloudflare storage adapter would throw an error when passing the KVNamespace type that is generated from running wrangler types

Set the cloudflare storage adapter to accept a generic type so I can pass the generated KvNamespace type from the generated worker-configuration.d.ts which is the result from running wrangler types

return issuer({
      storage: CloudflareStorage<KVNamespace>({
        namespace: env.CloudflareAuthKV,
      }),

The storage adapter still defaults to the types that come from the cloudflare provided worker types.

closes #316

… accept a generic to use generated type from wrangler types command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudflare Storage type conflict

1 participant