How do I fix the type issue though?

How do I fix the type issue though? Also, there are no docs on how to use DO with next-on-pages. I had to dig through discord to find "how to do it"
1 Reply
Dario
Dario•7mo ago
ah yeah sorry the type issue... 😓 I think that the problem is that your import Counter is making the d.ts file module scoped instead of globally scoped can you try changing that to
declare global {
interface CloudflareEnv {
COUNTERS: DurableObjectNamespace<Counter>;
}
}
declare global {
interface CloudflareEnv {
COUNTERS: DurableObjectNamespace<Counter>;
}
}
?
Want results from more Discord servers?
Add your server