interface Store { set ( key , value ) : Promise < void > ; get ( key ) : Promise < any > ; delete ( key ) : Promise < any > ; } const storage = ( window as any ) . storage as Store ; export function useStorage ( ) { return storage ; }