diff options
| author | Frank <[email protected]> | 2025-05-23 16:41:16 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-26 12:40:17 -0400 |
| commit | 72d10a08237e83516c22e687f1b450c787be1946 (patch) | |
| tree | fd8f9021409e7d83f4a0142d1f0e0a1a53c2d863 /app/packages/function/src | |
| parent | 7623b33f31939912c148623190cba1186dad4fd3 (diff) | |
| download | opencode-72d10a08237e83516c22e687f1b450c787be1946.tar.gz opencode-72d10a08237e83516c22e687f1b450c787be1946.zip | |
Share: fix types
Diffstat (limited to 'app/packages/function/src')
| -rw-r--r-- | app/packages/function/src/api.ts | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/app/packages/function/src/api.ts b/app/packages/function/src/api.ts index d08eedb4a..2c84cd4f9 100644 --- a/app/packages/function/src/api.ts +++ b/app/packages/function/src/api.ts @@ -1,20 +1,16 @@ import { DurableObject } from "cloudflare:workers" -import { - DurableObjectNamespace, - ExecutionContext, -} from "@cloudflare/workers-types" import { createHash } from "node:crypto" import path from "node:path" import { Resource } from "sst" type Bindings = { - SYNC_SERVER: DurableObjectNamespace<WebSocketHibernationServer> + SYNC_SERVER: DurableObjectNamespace } export class SyncServer extends DurableObject { private files: Map<string, string> = new Map() - constructor(ctx, env) { + constructor(ctx: DurableObjectState, env: Bindings) { super(ctx, env) this.ctx.blockConcurrencyWhile(async () => { this.files = await this.ctx.storage.list() @@ -38,10 +34,7 @@ export class SyncServer extends DurableObject { }) } - async webSocketMessage(ws, message) { - if (message === "load_history") { - } - } + async webSocketMessage(ws, message) {} async webSocketClose(ws, code, reason, wasClean) { ws.close(code, "Durable Object is closing WebSocket") |
