import { BUILTIN, type BuiltinBrand } from "../types/brand.js"; /** Everything a builtin action / guard object carries besides the brand and the `type`. */ type BuiltinProps = Omit; interface BuiltinShape { readonly [BUILTIN]: string; readonly type: string; } /** * Creates a builtin action / guard object the way XState does: a *function* * named like XState's inner function (`assign`, `raise`, ...) carrying the * `BUILTIN` brand, the XState `type` (`"xstate.assign"`, ...) and its payload * as own properties, frozen. * * A function (not a plain object) because TypeScript defers inference of a * nested generic call only when the callee returns a function type; see * `BuiltinCallable`. Calling the function throws: builtins are declarative. * `fn.name` matches XState so that `{ type: fn.name }` serialization (Stately * Inspector definition) renders identically. */ export declare function createBuiltin(brand: T[BuiltinBrand], name: string, type: T["type"], props: BuiltinProps): T; /** Brand check — the only way to tell a builtin from an inline action / guard function. */ export declare function isBuiltin(value: unknown): value is BuiltinShape; export {};