JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q34202F
  • License ISC

Module for safe inter process communication (IPC) in electron. TypeScript supported.

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 in tsconfig.json
  • null cannot be casted to void