UNPKG

@augmentcode/ag-redux-toolkit

Version:

Redux + Saga state management for Svelte apps — designed for AI agents. Includes runtime TypeScript source, AI skills, and reference documentation for robust, observable, high-performance state management.

22 lines • 1.43 kB
import { Observable } from 'kefir'; import { PreloadedStoreState, StoreOptions, StoreSelectorCallback, StoreStateMap } from './types'; import { StoreRuntime, StoreBoundState, StoreMiddlewareInput, StoreReducersInput } from './store-runtime'; import { StoreStreamingSelector } from './utils/streaming-selectors/create-selector'; export type { StoreOptions } from './types'; /** * Kefir/observable Store variant. Its selectors return Kefir streams when * called and keep .select/.effect escape hatches for tests and sagas. */ export declare class StreamingStore<TStateMap extends StoreStateMap = {}, TReducers extends StoreReducersInput<TStateMap> = StoreReducersInput<TStateMap>> extends StoreRuntime<TStateMap, TReducers> { private streamState; /** * Create a streaming Store with app-owned reducers and middlewares. * Throws if any reducer uses a package-reserved internal key. */ constructor(reducersMap?: TReducers & StoreReducersInput<TStateMap>, middleware?: StoreMiddlewareInput, options?: StoreOptions); init(initialState?: PreloadedStoreState): () => void; createSelector<ARGS extends any[] = [], R = unknown>(selectorFunc: StoreSelectorCallback<R, ARGS, StoreBoundState<TStateMap>>): StoreStreamingSelector<R, ARGS, StoreBoundState<TStateMap>>; getStreamState(): Observable<StoreBoundState<TStateMap>, any>; dispose(): void; } //# sourceMappingURL=streaming-store.d.ts.map