1 | import type { Atom } from 'jotai';
|
2 | type ShouldRemove<Param> = (createdAt: number, param: Param) => boolean;
|
3 | export interface AtomFamily<Param, AtomType> {
|
4 | (param: Param): AtomType;
|
5 | remove(param: Param): void;
|
6 | setShouldRemove(shouldRemove: ShouldRemove<Param> | null): void;
|
7 | }
|
8 | export declare function atomFamily<Param, AtomType extends Atom<unknown>>(initializeAtom: (param: Param) => AtomType, areEqual?: (a: Param, b: Param) => boolean): AtomFamily<Param, AtomType>;
|
9 | export {};
|