# Variable storageAdapters`Const`

storageAdapters: {
fromMapStore: < T >(
store: Writable<Map<string, T >>,
options?: StorageAdapterOptions ,
) => {
keyPath: string;
options: StorageAdapterOptions ;
store: {
set: (x: { key: string; value: T }[]) => void;
update: (
f: (x: { key: string; value: T }[]) => { key: string; value: T }[],
) => void;
subscribe(
this: void,
run: Subscriber<{ key: string; value: T }[]>,
invalidate?: Invalidator<{ key: string; value: T }[]>,
): Unsubscriber;
};
};
fromObjectStore: < T >(
store: Writable<Record<string, T >>,
options?: StorageAdapterOptions ,
) => {
keyPath: string;
options: StorageAdapterOptions ;
store: {
set: (x: { key: string; value: T }[]) => void;
update: (
f: (x: { key: string; value: T }[]) => { key: string; value: T }[],
) => void;
subscribe(
this: void,
run: Subscriber<{ key: string; value: T }[]>,
invalidate?: Invalidator<{ key: string; value: T }[]>,
): Unsubscriber;
};
};
fromRepository: (
repository: Repository < TrustedEvent >,
options?: StorageAdapterOptions ,
) => {
keyPath: string;
options: StorageAdapterOptions ;
store: WritableWithGetter < TrustedEvent []>;
};
fromRepositoryAndTracker: (
repository: Repository < TrustedEvent >,
tracker: Tracker ,
options?: StorageAdapterOptions ,
) => {
keyPath: string;
options: StorageAdapterOptions ;
store: WritableWithGetter <{ event: TrustedEvent ; relays: string[] }[]>;
};
fromTracker: (
tracker: Tracker ,
options?: StorageAdapterOptions ,
) => {
keyPath: string;
options: StorageAdapterOptions ;
store: WritableWithGetter <{ key: string; value: string[] }[]>;
};
} = ...

- Defined in packages/app/src/storage.ts:133