Test/node_modules/jotai/ts3.8/vanilla/utils/atomWithDefault.d.ts
2026-04-09 22:54:00 +07:00

10 lines
No EOL
477 B
TypeScript

import type { SetStateAction, WritableAtom } from 'jotai/vanilla';
import { RESET } from './constants';
type Read<Value, Args extends unknown[], Result> = WritableAtom<Value, Args, Result>['read'];
export declare function atomWithDefault<Value>(getDefault: Read<Value, [
SetStateAction<Value> | typeof RESET
], void>): WritableAtom<Value, [
SetStateAction<Value> | typeof RESET
], void>;
export {};
declare type Awaited<T> = T extends Promise<infer V> ? V : T;