`wrangler types` uses generic type for `DurableObjectNamespace`

I have a Worker with the default being the extended WorkerEntrypoint and a DurableObject DO. runnign wrangler types gives:
declare namespace Cloudflare {
interface Env {
MY_DURABLE_OBJECT: DurableObjectNamespace /* MyDurableObject */;
}
}
declare namespace Cloudflare {
interface Env {
MY_DURABLE_OBJECT: DurableObjectNamespace /* MyDurableObject */;
}
}
So clearly it knows even the name of the DO, just refuses to put it as DurableObjectNamespace<MyDurableObject>
7 Replies
veeque
veequeOP•6d ago
The error appeared when i switched from export default { /**/ } to export default class extends WorkerEntrypoint<Env> { /**/ }
Hard@Work
Hard@Work•6d ago
Do you have a repo I can test against?
veeque
veequeOP•6d ago
I can share the repo i was testing with, maybe it's an error on my part since i'm not replicating it on a new project
veeque
veequeOP•6d ago
GitHub
GitHub - victormihalache/cf-typegen-issue
Contribute to victormihalache/cf-typegen-issue development by creating an account on GitHub.
veeque
veequeOP•6d ago
don't mind some of the other stuff, i was playing around with it i feel so dumb, i had a syntax error on the worke entrypoint
Hard@Work
Hard@Work•6d ago
Try removing the trailing comma
veeque
veequeOP•6d ago
yea that was the issue 😅 ty for looking into it tho!

Did you find this page helpful?