// WorkerEntrypoint class definition
export class MyEntrypointService extends WorkerEntrypoint<CloudflareEnv> {
constructor(ctx: ExecutionContext, env: CloudflareEnv) {
super(ctx, env);
}
}
// If I need to instantiate the service
const myService = new MyEntrypointService(this.ctx, this.env);
// WorkerEntrypoint class definition
export class MyEntrypointService extends WorkerEntrypoint<CloudflareEnv> {
constructor(ctx: ExecutionContext, env: CloudflareEnv) {
super(ctx, env);
}
}
// If I need to instantiate the service
const myService = new MyEntrypointService(this.ctx, this.env);