@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Interface WebviewRpcSchema

    Contract for a webview RPC channel. Define one interface per webview and reference it from both the extension host code (createWebviewRpc) and the webview bundle (createWebviewRpcClient), so the two sides cannot drift.

    The two naming conventions here differ, because requests and events need different information. A request field is named after the side that answers it (webviewRequests are handled by the webview), since that's the side whose handler signature the types have to describe. An event field is named after the side that sends it (hostEvents travel host → webview), because a one-way message has no handler contract to pin down.

    interface WebviewRpcSchema {
        hostEvents?: Record<string, unknown>;
        hostRequests?: Record<string, { params: unknown; result: unknown }>;
        webviewEvents?: Record<string, unknown>;
        webviewRequests?: Record<string, { params: unknown; result: unknown }>;
    }
    Index
    hostEvents?: Record<string, unknown>

    Host → Webview. One-way events (no response expected).

    hostRequests?: Record<string, { params: unknown; result: unknown }>

    Handled by the host. The webview calls these; bind with rpc.onRequest.

    webviewEvents?: Record<string, unknown>

    Webview → Host. One-way events (no response expected).

    webviewRequests?: Record<string, { params: unknown; result: unknown }>

    Handled by the webview. The host calls these with rpc.request.