import { IpcRendererService } from '@services/electron/ipcrenderer.service' ; import { SettingsProvider } from "@interfaces/setting-provider" ; export class SettingsProviderIpc implements SettingsProvider { private ipcRendererService : IpcRendererService ; constructor ( ipcRendererService ) { this . ipcRendererService = ipcRendererService ; } write ( key , value ) { this . ipcRendererService . send ( 'write-settings' , key , value ) ; } read < T > ( key ) { return this . ipcRendererService . sendSync ( 'read-settings' , key ) ; } }