import { AdaptOptions, InitialState, InitializedSmartStore, NotAdaptOptions, SmartStore } from '@state-adapt/rxjs'; import { Adapter, BasicAdapterMethods, ReactionsWithSelectors, Selectors, WithGetState } from '@state-adapt/core'; /** * Functions that read a store's state and each of its selector results. * * @hidden */ export type StoreSelectorReaders> = (() => State) & { [K in keyof S]: () => ReturnType; }; /** * The store returned by {@link adapt}. Call the store for its current state, or * a selector property for its current result. * * @hidden */ export type ReactStore, R extends ReactionsWithSelectors> = InitializedSmartStore & StoreSelectorReaders>; /** * The store returned by {@link watch}. Call the store for its current state, or * a selector property for its current result. Reads are `undefined` while the * store is inactive. * * @hidden */ export type ReactWatch> = SmartStore> & (() => State | undefined) & { [K in keyof (S & WithGetState)]: () => ReturnType<(S & WithGetState)[K]> | undefined; }; export declare function createReactStore, R extends ReactionsWithSelectors>(storeObj: InitializedSmartStore): ReactStore; export declare function createReactWatchStore>(storeObj: SmartStore>): ReactWatch; export declare const createReactAdapt: (adapt: (...args: any[]) => any) => { /** Creates a store using this StateAdapt instance. */ , R extends ReactionsWithSelectors, R2 extends ReactionsWithSelectors, ReturnedSources = unknown>(initialState: InitialState, second?: (R & { selectors?: S; } & NotAdaptOptions) | AdaptOptions): ReactStore; }; export declare const createReactWatch: (watch: (...args: any[]) => any) => { /** Watches a store path using this StateAdapt instance. */ = {}, R extends ReactionsWithSelectors = {}>(path: string, adapter?: Adapter>): ReactWatch; };