import { RemoveUIMessage, UIMessage } from "../types.js"; import { ComponentPropsWithoutRef, ElementType } from "react"; //#region src/react-ui/server/server.d.ts interface MessageLike { id?: string; } /** * Helper to send and persist UI messages. Accepts a map of component names to React components * as type argument to provide type safety. Will also write to the `options?.stateKey` state. * * @param config LangGraphRunnableConfig * @param options * @returns */ declare const typedUi: >(config: { writer?: ((chunk: unknown) => void) | undefined; runId?: string | undefined; metadata?: Record | undefined; tags?: string[] | undefined; runName?: string | undefined; configurable?: { [key: string]: unknown; __pregel_send?: ((writes_: [string, unknown][]) => void) | undefined; } | undefined; }, options?: { /** The key to write the UI messages to. Defaults to `ui`. */stateKey?: string | undefined; } | undefined) => { push: { (message: { id?: string | undefined; name: K; props: { [K_1 in keyof Decl]: ComponentPropsWithoutRef }[K]; metadata?: Record | undefined; }, options?: { message?: MessageLike | undefined; merge?: boolean | undefined; } | undefined): UIMessage }[K]>; (message: { id?: string | undefined; name: K; props: Partial<{ [K_1 in keyof Decl]: ComponentPropsWithoutRef }[K]>; metadata?: Record | undefined; }, options: { message?: MessageLike | undefined; merge: true; }): UIMessage }[K]>>; }; delete: (id: string) => RemoveUIMessage; items: (RemoveUIMessage | UIMessage>)[]; }; //#endregion export { typedUi }; //# sourceMappingURL=server.d.ts.map