UNPKG

1.18 kBTypeScriptView Raw
1import { PropsWithChildren } from 'react';
2import { Atom } from './atom';
3import { getScopeContext } from './contexts';
4import { ScopeContainer } from './contexts';
5import { createStoreForExport } from './store';
6type Scope = NonNullable<Parameters<typeof getScopeContext>[0]>;
7export declare const Provider: ({ children, initialValues, scope, unstable_createStore, unstable_enableVersionedWrite, }: PropsWithChildren<{
8 initialValues?: Iterable<readonly [
9 Atom<unknown>,
10 unknown
11 ]>;
12 scope?: Scope;
13 /**
14 * This is an unstable feature to use exported createStore.
15 */
16 unstable_createStore?: typeof createStoreForExport;
17 /**
18 * This is an unstable experimental feature for React 18.
19 * When this is enabled, a) write function must be pure
20 * (read function must be pure regardless of this),
21 * b) React will show warning in DEV mode,
22 * c) then state branching works.
23 */
24 unstable_enableVersionedWrite?: boolean;
25}>) => import("react").FunctionComponentElement<import("react").ProviderProps<ScopeContainer>>;
26export {};
27declare type Awaited<T> = T extends Promise<infer V> ? V : T;
\No newline at end of file