foo-webview-sdk
    Preparing search index...

    Interface StateChangedPayload<T>

    Payload of state:changed with value and previousValue typed for a key whose values the page knows; without a type argument they are unknown. FBEventPayloadMap['state:changed'] types them as JsonValue, which is what the host sends.

    interface StateChangedPayload<T = unknown> {
        expiresAt?: number;
        key: string;
        previousValue: T | null;
        sourceWindowId: string;
        value: T;
    }

    Type Parameters

    • T = unknown

    Hierarchy

    • Omit<GeneratedStateChangedPayload, "value" | "previousValue">
      • StateChangedPayload
    Index
    expiresAt?: number

    When the value expires, in milliseconds since the Unix epoch; present only for a value stored with a positive ttlMs.

    key: string

    The key.

    previousValue: T | null

    The value the key held before; null when the key is new.

    sourceWindowId: string

    Id of the window that stored it; main when the caller cannot be matched to a window.

    value: T

    The stored value; never null.