@expofp/floorplan
Version:
Interactive floor plan library for expos and events
20 lines • 1.26 kB
TypeScript
import { autorun, type IReactionOptions, type IReactionPublic, type IWhenOptions } from 'mobx';
/**
* `autorun`, `reaction` and `when` whose disposers belong to the live plan.
*
* A reaction created while a plan is loading stays subscribed to the store
* instance it first read, so one left undisposed survives
* `unstable_destroy()` — it pins the dead event's graph in memory and keeps
* writing to storage on its behalf, while never seeing the next plan
* (ADR-0011; spike finding in
* `docs/2026-08-27-plan-swap-proxy-spike-verdict.md`).
*
* Use these anywhere the plan's own construction creates a reaction: the store
* constructors, `store/init/*`, `floorplan.ready`, the drawing config. React
* components keep using plain MobX — unmount disposes them.
*/
export declare function planAutorun(...args: Parameters<typeof autorun>): void;
export declare function planReaction<T>(expression: (r: IReactionPublic) => T, effect: (argument: T, r: IReactionPublic) => void, options?: IReactionOptions): void;
/** A `when` that fires once, and is disposed unfired if the plan goes first. */
export declare function planWhen(predicate: () => boolean, effect: () => void, options?: IWhenOptions): void;
//# sourceMappingURL=plan-reactions.d.ts.map