This is the dev preview website. Check out the document at lynxjs.org

Home > @lynx-js/genui > prepareMessagesForProcessing

prepareMessagesForProcessing() function

Tag messages with the given messageId and report whether any of them carries a non-empty updateComponents. Also dedupes createSurface messages against the set of currently-active surfaces.

Signature:

export declare function prepareMessagesForProcessing(rawMessages: ServerToClientMessage[], messageId: string, activeSurfaceIds: Set<string>): {
    messages: ServerToClientMessage[];
    hasComponentUpdate: boolean;
};

Parameters

Parameter

Type

Description

rawMessages

ServerToClientMessage[]

messageId

string

activeSurfaceIds

Set<string>

Returns:

{ messages: ServerToClientMessage[]; hasComponentUpdate: boolean; }