Skip to content

fix(openauth-template): cast KVNamespace to fix type mismatch - #909

Closed
deloreyj wants to merge 1 commit into
mainfrom
fix/openauth-template-types
Closed

deloreyj wants to merge 1 commit into
mainfrom
fix/openauth-template-types

Conversation

@deloreyj

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes CI type check failure in openauth-template
  • The @openauthjs/openauth library imports KVNamespace from @cloudflare/workers-types, but we use wrangler's generated runtime types which define their own KVNamespace
  • These types are structurally compatible at runtime but TypeScript sees them as incompatible
  • Using as any cast resolves the type mismatch

This was blocking other PRs like #906 from passing CI.

…penauthjs/openauth

The @openauthjs/openauth library imports KVNamespace from @cloudflare/workers-types,
but we use wrangler's generated runtime types which define their own KVNamespace.
These types are structurally compatible at runtime but TypeScript sees them as
incompatible. Using 'as any' resolves the CI type check failure.
@deloreyj deloreyj closed this Jan 15, 2026
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.

1 participant