-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe the bug
I'm using npx wrangler types --experimental-include-runtime to generate my binding types, which creates a worker-configuration.d.ts file in the root of my project that looks like this:
// Generated by Wrangler by running `wrangler types --experimental-include-runtime`
interface Env {
OG: KVNamespace;
DB: D1Database;
ASSETS: Fetcher;
}
Now the types for (await getCloudflareContext()).env. look like this
Because this package ships then like this:
declare global {
interface CloudflareEnv {
NEXT_CACHE_WORKERS_KV?: KVNamespace;
ASSETS?: Fetcher;
}
}If I rename the generated types to CloudflareEnv I see everything:
So either this package or the wrangler types command need to agree on the Env / CloudflareEnv naming?
Steps to reproduce
see above
Expected behavior
see above
@opennextjs/cloudflare version
0.3.4
Wrangler version
3.99.0
next info output
15.1.2Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation