Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
18 lines
867 B
Plaintext
18 lines
867 B
Plaintext
import { Atom, AtomOptions, Observer, ReadonlyAtom } from './types.cjs';
|
|
export declare function toObserver<T>(nextHandler?: Observer<T> | ((value: T) => void), errorHandler?: (error: any) => void, completionHandler?: () => void): Observer<T>;
|
|
export declare function batch(fn: () => void): void;
|
|
export declare function flush(): void;
|
|
type AsyncAtomState<TData, TError = unknown> = {
|
|
status: 'pending';
|
|
} | {
|
|
status: 'done';
|
|
data: TData;
|
|
} | {
|
|
status: 'error';
|
|
error: TError;
|
|
};
|
|
export declare function createAsyncAtom<T>(getValue: () => Promise<T>, options?: AtomOptions<AsyncAtomState<T>>): ReadonlyAtom<AsyncAtomState<T>>;
|
|
export declare function createAtom<T>(getValue: (prev?: NoInfer<T>) => T, options?: AtomOptions<T>): ReadonlyAtom<T>;
|
|
export declare function createAtom<T>(initialValue: T, options?: AtomOptions<T>): Atom<T>;
|
|
export {};
|