import { ipcRenderer } from "electron" ; import { StorageService } from "jslib-common/abstractions/storage.service" ; export class ElectronRendererStorageService implements StorageService { get < T > ( key ) { return ipcRenderer . invoke ( "storageService" , { action : "get" , key : key , } ) ; } has ( key ) { return ipcRenderer . invoke ( "storageService" , { action : "has" , key : key , } ) ; } save ( key , obj ) { return ipcRenderer . invoke ( "storageService" , { action : "save" , key : key , obj : obj , } ) ; } remove ( key ) { return ipcRenderer . invoke ( "storageService" , { action : "remove" , key : key , } ) ; } }