/** * @module builder-utils * @category Internal * * Shared builder machinery reused by both `act-builder.ts` and * `slice-builder.ts`. The two builders expose the same reaction-registration * and lane-declaration surface and differ only in the concrete builder type * they return (`ActBuilder` vs `SliceBuilder`) and the event register they * write into (`registry.events` vs the slice's `events`). This module owns the * one copy of that logic so the builders stay thin delegations. * * @internal */ import { type DeferSchedule } from "../internal/index.js"; import type { Committed, EventRegister, LaneConfig, ReactionHandler, ReactionOptions, ReactionResolver, Schemas } from "../types/index.js"; /** * Validate and register a drain lane (ACT-1103): the `"default"` name is * reserved and each lane name must be unique. Mutates `lanes` in place; the * caller returns its own builder for chaining. * * @internal */ export declare function register_lane(config: LaneConfig, lanes: LaneConfig[]): void; /** * Build the `.on(event)` step shared by both builders. Registers a reaction * (named-function + duplicate guards, fail-fast literal-schedule validation, * the default `_this_` resolver, and the `.defer` handler wrap) into * `events[event].reactions`, and hands back `builder` patched with `.to(...)` * for in-place resolver routing. * * The strict, builder-specific type is supplied by each builder's own `on` * signature ({@link ReactionOn}); the runtime here is builder-agnostic. * * @internal */ export declare function reaction_on(event: TKey, events: EventRegister, builder: TBuilder): { do: (handler: ReactionHandler, options?: Partial) => object & { to(resolver: ReactionResolver | string): TBuilder; }; defer: (schedule: DeferSchedule>) => { do: (handler: ReactionHandler, options?: Partial) => object & { to(resolver: ReactionResolver | string): TBuilder; }; }; }; //# sourceMappingURL=builder-utils.d.ts.map