Lynx

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; }

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.