Datalayer VS Code Extension - v0.0.4
    Preparing search index...

    Type Alias ExtensionMessage

    Extension message structure for bidirectional communication between the VS Code extension host and webview panels.

    // In extension (Node.js context):
    webviewPanel.webview.postMessage({
    type: 'document-content',
    body: notebookContent,
    id: documentId
    });

    // In webview (browser context):
    vscode.postMessage({
    type: 'save-document',
    body: updatedContent,
    requestId: 'save-123'
    });
    type ExtensionMessage = {
        body?: unknown;
        error?: unknown;
        id?: string;
        requestId?: string;
        type: string;
    }
    Index

    Properties

    body?: unknown

    Message payload. Contains the actual data being transmitted (document content, edits, etc.)

    error?: unknown

    Error information if the message represents an error response. Used when responding to a request that failed.

    id?: string

    Message owner/context identifier.

    • For HTTP requests: request ID
    • For WebSocket messages: client ID
    • For documents: document UID
    requestId?: string

    Request ID for matching responses to requests. Used in request-response patterns to correlate messages.

    type: string

    Message type identifier. Common types: 'document-content', 'save-document', 'websocket-message', 'authentication-token', 'runtime-config', 'error'