/** Like React.setState: either a value or a function of the previous value */
type Updater<S> = S | ((prev: S) => S);
/**
 * Create a shared store that survives hot-reloads.
 *
 * Pass a unique `name` once per logical store module:
 *   export const useSidebarStore = createSharedStore('sidebar', { open: false });
 */
export declare function createSharedStore<S>(name: string, initialState: S): UseSharedStoreHook<S>;
type UseSharedStoreHook<S> = () => readonly [S, (u: Updater<S>) => void];
export {};
