UNPKG
sinotron
Version:
latest (0.1.0-alpha)
0.1.0-alpha
0.0.3-alpha
0.0.1-dev
0.0.1-alpha
Simple framework for Typescript Electron projects
sinotron
/
dist
/
lib
/
base-api.client.js
13 lines
(12 loc)
•
265 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
// @ts-ignore
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
.
getImpl
()); } }