import { PersistentStorage } from '../types' ; export class IonicStorageWrapper implements PersistentStorage < string | null > { private storage ; constructor ( storage ) { this . storage = storage ; } getItem ( key ) { return this . storage . get ( key ) ; } removeItem ( key ) { return this . storage . remove ( key ) ; } setItem ( key , value ) { return this . storage . set ( key , value ) ; } } interface IonicStorageInterface { get ( key ) : Promise < string | null > ; set ( key , value ) : Promise < void > ; remove ( key ) : Promise < void > ; }