@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
35 lines (34 loc) • 1.06 kB
TypeScript
import { Observable } from 'rxjs';
import { Rpc } from '../rpc/rpc';
/**
* Electron Module Side Service.
*/
export declare class Electron {
private rpc;
/**
* Subject for tracking RPC responses from the electron host
*/
private watcher;
/**
* Initializes a new instance of the Electron Manager class
* @param rpc The rpc to forward auth requests to a parent window
*/
constructor(rpc: Rpc);
/**
* Send Electron Host Request
* @param eventName The electron host event
* @param payload The the event payload
* @returns An observable for te response message from the electron host
*/
request<T>(eventName: string, payload: any): Observable<T>;
/**
* Initializes the electron rpc response listener
* This is a module side only class. It should not be called from the shell
*/
initialize(): void;
/**
* Handles rpc response messages from the electron host.
* @param data the result of the electron host request
*/
private onRpcResponse;
}