import type {LinkStorage} from '@proton/link' export class Storage implements LinkStorage { // eslint-disable-next-line no-unused-vars constructor(readonly keyPrefix: string) {} async write(key: string, data: string): Promise { localStorage.setItem(this.storageKey(key), data) } async read(key: string): Promise { return localStorage.getItem(this.storageKey(key)) } async remove(key: string): Promise { localStorage.removeItem(this.storageKey(key)) } storageKey(key: string) { return `${this.keyPrefix}-${key}` } }