workers-shim.ts
This file
Path
apps/platform/test/workers-shim.ts
39 lines · 788 bytes · TypeScript
Last changed by
Merge observability into mainoscabrielbefore adoption1985111
History of this fileTake it
12345678910111213141516171819202122232425262728293031323334353637383940import { fakeEnv } from "./fake-env.ts";
export class DurableObject<E = Env> { readonly ctx: DurableObjectState;
readonly env: E;
constructor(ctx: DurableObjectState, env: E) { this.ctx = ctx; this.env = env; }}
export class WorkflowEntrypoint<E = Env> { readonly ctx: ExecutionContext;
readonly env: E;
constructor(ctx: ExecutionContext, env: E) { this.ctx = ctx; this.env = env; }}
export class WorkerEntrypoint<E = Env> { readonly ctx: ExecutionContext;
readonly env: E;
constructor(ctx: ExecutionContext, env: E) { this.ctx = ctx; this.env = env; }}
export const env = fakeEnv();
// Outside workerd no invocation is traced: every span is a no-op.export { untracedTracing as tracing } from "@repo/telemetry/spans/memory";