UNPKG
@sinotron/core
Version:
latest (0.0.7-alpha)
0.0.7-alpha
0.0.6-alpha
0.0.4-alpha
0.0.2-alpha
0.0.1-alpha
Simple framework for Typescript Electron projects
@sinotron/core
/
dist
/
lib
/
base-api.client.js
12 lines
(11 loc)
•
248 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
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
()); } }