const localStorage = browser . storage . local ; export type Storage = { [ key in EnumString < 'configVersion' > ] : string ; } ; async function get < T extends { [ key ] : any ; } > ( mapping = null ) { try { return ( await localStorage . get ( mapping || undefined ) ) as T ; } catch ( err ) { } } function set ( value ) { try { return localStorage . set ( value ) ; } catch ( err ) { } } export const storageHelper = { get , set } ;