UNPKG

700 BTypeScriptView Raw
1import { Context } from 'react';
2import { State, UpdateState } from './vanilla';
3export declare type Store = {
4 s: State;
5 u: UpdateState;
6 l: Set<() => void>;
7};
8export declare const createStore: (initialValues?: Iterable<readonly [
9 import("./types").Atom<unknown>,
10 unknown
11]> | undefined) => any;
12export declare const subscribeToStore: (store: Store, callback: () => void) => () => void;
13declare type StoreContext = Context<ReturnType<typeof createStore>>;
14export declare const StoreContextMap: Map<string | number | symbol | undefined, StoreContext>;
15export declare const getStoreContext: (scope?: string | number | symbol | undefined) => StoreContext;
16export {};