( options: ElectronSQLitePersistenceOptions, )
| 315 | } |
| 316 | |
| 317 | function resolveInvoke( |
| 318 | options: ElectronSQLitePersistenceOptions, |
| 319 | ): ElectronPersistenceInvoke { |
| 320 | if (options.invoke) { |
| 321 | return options.invoke |
| 322 | } |
| 323 | |
| 324 | if (options.ipcRenderer) { |
| 325 | return (channel, request) => options.ipcRenderer!.invoke(channel, request) |
| 326 | } |
| 327 | |
| 328 | throw new InvalidPersistedCollectionConfigError( |
| 329 | `Electron renderer persistence requires either invoke or ipcRenderer`, |
| 330 | ) |
| 331 | } |
| 332 | |
| 333 | export function createElectronSQLitePersistence( |
| 334 | options: ElectronSQLitePersistenceOptions, |
no outgoing calls
no test coverage detected