/**
 * Allows storing and persisting user settings.
 */ export interface StorageAdapter { get ( key ) : Promise < string | null > ; set ( key , value ) : Promise < void > ; remove ( key ) : Promise < void > ; } /**
 * Adapter to use `localStorage` for storage.
 */ export const LOCAL_STORAGE_ADAPTER = { get ( key ) { return Promise . resolve ( localStorage . getItem ( key ) ) ; } , set ( key , value ) { localStorage . setItem ( key , value ) ; return Promise . resolve ( ) ; } , remove ( key ) { localStorage . removeItem ( key ) ; return Promise . resolve ( ) ; } , } ;