typedef: add IPCStoreApi
This commit is contained in:
parent
822fddb8d2
commit
04c77e8085
23
gluon.d.ts
vendored
23
gluon.d.ts
vendored
@ -15,6 +15,26 @@ type PageApi = {
|
|||||||
title: Promise<string>
|
title: Promise<string>
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type IPCStoreApi = {
|
||||||
|
/** Get a key from the IPC store. */
|
||||||
|
get(
|
||||||
|
/** Key to get. */
|
||||||
|
key: string
|
||||||
|
): any,
|
||||||
|
|
||||||
|
/** Set a key to the provided value in the IPC store (has to be serializable to JSON). */
|
||||||
|
set<T>(
|
||||||
|
/** Key to set to. */
|
||||||
|
key: string,
|
||||||
|
|
||||||
|
/** Value to set. */
|
||||||
|
value: any
|
||||||
|
): void,
|
||||||
|
|
||||||
|
/** Get or set a key from the IPC Store (has to be serializable to JSON). */
|
||||||
|
[key: string]: any,
|
||||||
|
};
|
||||||
|
|
||||||
type IPCApi = {
|
type IPCApi = {
|
||||||
/**
|
/**
|
||||||
* Send an IPC event to the web context.
|
* Send an IPC event to the web context.
|
||||||
@ -72,6 +92,9 @@ type IPCApi = {
|
|||||||
/** Key name to unexpose (remove). */
|
/** Key name to unexpose (remove). */
|
||||||
key: string
|
key: string
|
||||||
): void,
|
): void,
|
||||||
|
|
||||||
|
/** IPC Store API. */
|
||||||
|
store: IPCStoreApi,
|
||||||
};
|
};
|
||||||
|
|
||||||
type CDPApi = {
|
type CDPApi = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user