import { A2uiMessageProcessor } from "../../data/model-processor.js"; import { NumberValue, type StringValue } from "../../types/primitives.js"; import { type AnyComponentNode } from "../../types/types.js";
export function extractStringValue(
val: StringValue | null,
component: AnyComponentNode | null,
processor: A2uiMessageProcessor | null,
surfaceId: string | null
): string { if (val !== null && typeof val === "object") { if ("literalString" in val) { return val.literalString ?? "";
} elseif ("literal" in val && val.literal !== undefined) { return val.literal ?? "";
} elseif (val && "path" in val && val.path) { if (!processor || !component) { return"(no model)";
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.