type MaybePartial<T> = T | Partial<T>;
type StoreApi<T> = {
    getState(): T;
    getInitialState(): T;
    /**
     * @param nextState The next (partial) state.
     * @param replace If true, the next state will replace the current state.
     */
    setState(nextState: MaybePartial<T>, replace?: boolean): void;
    /**
     * @returns unsubscribe
     */
    subscribe(listener: (state: T, prevState: T) => void): () => void;
};
declare function createStore<TState>(initialState: TState): StoreApi<TState>;

export { type MaybePartial, type StoreApi, createStore };
