> when I import my WorkerEntrypoint How/what are you importing in that case? are you importing the t

when I import my WorkerEntrypoint
How/what are you importing in that case? are you importing the type? If so, that could be the issue maybe. It should just be a service.d.ts file for example that includes the types, not an import.

simplified my worker looks like this:

export default class MyService extends WorkerEntrypoint<Env> {
async fetch() {
return new Response("OK");
}

async doStuff() {}
}

and the in my other project I bind to the service and have a service.d.ts like so:

declare class MyService extends WorkerEntrypoint {
async doStuff(): Promise<void>;
}

and

interface Env {
MY_SERVICE: MyService;
}

but no import.
Was this page helpful?