/** * `Store` — TEA-style reducer store. * * @module */ import type { Stream } from 'effect'; import { Effect } from 'effect'; interface StoreShape { readonly _tag: 'Store'; readonly get: Effect.Effect; readonly changes: Stream.Stream; dispatch(msg: Msg): Effect.Effect; } interface EffectfulStoreShape { readonly _tag: 'Store'; readonly get: Effect.Effect; readonly changes: Stream.Stream; dispatch(msg: Msg): Effect.Effect; } /** * Store — TEA-style state container. * Build with an initial state and a pure `reducer(state, msg) => state`, then * dispatch messages; the store publishes the resulting state via `changes`. * Use `makeWithEffect` when the reducer is itself an `Effect`. */ export declare const Store: { /** Synchronous reducer store. */ make: (initial: S, reducer: (state: S, msg: Msg) => S) => Effect.Effect>; /** Reducer store where state transitions are themselves `Effect`s. */ makeWithEffect: (initial: S, reducer: (state: S, msg: Msg) => Effect.Effect) => Effect.Effect>; }; export declare namespace Store { /** Structural shape of a synchronous store. */ type Shape = StoreShape; /** Structural shape of an effectful store; adds error channel `E` and requirements `R`. */ type Effectful = EffectfulStoreShape; } export {}; //# sourceMappingURL=store.d.ts.map