interface DurableObjectState {
    id: DurableObjectId;
    storage: DurableObjectStorage;
    acceptWebSocket(ws, tags?): void;
    blockConcurrencyWhile<T>(callback): Promise<T>;
    getHibernatableWebSocketEventTimeout(): number;
    getTags(ws): string[];
    getWebSocketAutoResponse(): WebSocketRequestResponsePair;
    getWebSocketAutoResponseTimestamp(ws): Date;
    getWebSockets(tag?): WebSocket[];
    setHibernatableWebSocketEventTimeout(timeoutMs?): void;
    setWebSocketAutoResponse(maybeReqResp?): void;
    waitUntil(promise): void;
}

Properties

Methods

  • Parameters

    Returns void

  • Type Parameters

    • T

    Parameters

    • callback: (() => Promise<T>)
        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

  • Returns number

  • Parameters

    Returns string[]

  • Parameters

    Returns Date

  • Parameters

    • Optional tag: string

    Returns WebSocket[]

  • Parameters

    • Optional timeoutMs: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    • promise: Promise<any>

    Returns void