zsmooth
zsmooth
CDCloudflare Developers
Created by zsmooth on 10/2/2024 in #workers-help
DurableObjectNamespace losing its type?
I have a worker-configuration.d.ts that looks like this:
interface Env {
CHATSTORE: DurableObjectNamespace<import("./build/index").ChatStore>;
}
interface Env {
CHATSTORE: DurableObjectNamespace<import("./build/index").ChatStore>;
}
I also have "types": ["@remix-run/cloudflare", "@cloudflare/workers-types"], in my tsconfig.json so that Env is available everywhere in my app. However, Env["CHATSTORE"] shows up as DurableObjectNamespace<any> everywhere, instead of DurableObjectNamespace<ChatStore>. How do I get that type to not devolve to any?
10 replies