Package Exports
- electron-typesafe-ipc
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (electron-typesafe-ipc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
electron-typesafe-ipc
Module for safe inter process communication (IPC) in electron. TypeScript supported.
Installation
yarn add electron-typesafe-ipc
Usage
configure typesafe ipc:
//tsipc.ts
import {createTypesafeIpc} from "electron-typesafe-ipc";
//first, we describe the ipc communication schema - channels, their direction (rend -> main / main->rend) and type of their params
//then, we specify the
//third,
export const tsipc = createTypesafeIpc(ipcSchema);
profit:
???
The reason why the typings have to be defined explicitly are:
- you would get error if you had
strictNullCheck:true
intsconfig.json
null
cannot be casted tovoid