Skip to main content
Version: v10.0.0

DbStorage

Storage for persisted rows and the outbox, such as localStorage or an async key-value store


Import
import { DbStorage } from "@hyper-fetch/db"

Preview​

type DbStorage = {
getItem: (key: string) => string | null | Promise<(string | null)>;
removeItem: (key: string) => unknown;
setItem: (key: string, value: string) => unknown;
}

Structure​

DbStorage
NameTypeDescription
getItem
(key: string) => string | null | Promise<(string | null)>
removeItem
(key: string) => unknown
setItem
(key: string, value: string) => unknown