@worker-tools/kv-storage-polyfill
Version:
Typed wrapper around https://github.com/GoogleChromeLabs/kv-storage-polyfill
7 lines (6 loc) • 446 B
text/typescript
import type { StorageArea as IStorageArea, Options } from "kv-storage-interface";
import storage, { StorageArea as StorageAreaImpl } from "kv-storage-polyfill";
type StorageAreaConstructor = new (name: string, opts?: Options) => IStorageArea;
type StorageAreaClass = StorageAreaConstructor & { prototype: IStorageArea };
export const StorageArea = StorageAreaImpl as unknown as StorageAreaClass
export default storage as unknown as IStorageArea;