import { assign as xAssign } from "xstate"; import type { ChatEvent } from "./chat-events"; import type { ChatState } from "./chat-state"; export type ChatActionArgs = { context: ChatState; event: ChatEvent }; export type ChatContextArgs = { context: ChatState }; export const chatAssign = ( assignment: Parameters< typeof xAssign >[0], ) => xAssign(assignment);