UNPKG

@sinotron/core

Version:

Simple framework for Typescript Electron projects

12 lines (11 loc) 248 B
import { contextBridge } from 'electron'; // To be used in preload.ts export class BaseApiClient { key; constructor(key) { this.key = key; } expose() { contextBridge.exposeInMainWorld(this.key, this.impl()); } }