UNPKG

592 BTypeScriptView Raw
1import { useAtom } from 'jotai';
2import type { Atom, WritableAtom } from 'jotai';
3type Scope = NonNullable<Parameters<typeof useAtom>[1]>;
4type DevtoolOptions = {
5 name?: string;
6 scope?: Scope;
7 enabled?: boolean;
8};
9export declare function useAtomDevtools<Value, Result extends void | Promise<void>>(anAtom: WritableAtom<Value, Value, Result> | Atom<Value>, options?: DevtoolOptions): void;
10export declare function useAtomDevtools<Value, Result extends void | Promise<void>>(anAtom: WritableAtom<Value, Value, Result> | Atom<Value>, name?: string, scope?: Scope): void;
11export {};