@coveo/headless
    Preparing search index...

    Interface Context

    The Context controller injects custom contextual information into the search requests and usage analytics search events sent from a search interface.

    Example: context.ts

    interface Context {
        state: ContextState;
        add(contextKey: string, contextValue: ContextValue): void;
        remove(key: string): void;
        set(context: ContextPayload): void;
        subscribe(listener: () => void): Unsubscribe;
    }

    Hierarchy (View Summary)

    Index

    Methods

    Properties

    Methods

    Properties

    The state of the Context controller.