How to use the electron-rpc-api.WebViewApiService function in electron-rpc-api

To help you get started, we’ve selected a few electron-rpc-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vladimiry / ElectronMail / src / shared / api / webview / index.ts View on Github external
import {ApiMethod, ApiMethodNoArgument, WebViewApiService} from "electron-rpc-api";

import {LoginFieldContainer, MailPasswordFieldContainer, PasswordFieldContainer} from "_@shared/model/container";
import {AccountNotificationOutput} from "./notification-output";

export interface Endpoints {
    fillLogin: ApiMethod;
    login2fa: ApiMethod;
    login: ApiMethod;
    notification: ApiMethodNoArgument;
    unlock: ApiMethod;
}

export const IPC_WEBVIEW_API = new WebViewApiService({channel: `${process.env.APP_ENV_PACKAGE_NAME}:webview-api`});

electron-rpc-api

Wrapper around the Electron's IPC for building type-safe API based RPC-like and reactive interactions

MIT
Latest version published 4 months ago

Package Health Score

62 / 100
Full package analysis