declare const enum IpcChannel { LOGIN = 'LOGIN', LOGGED_IN = 'LOGGED_IN', } interface IIpcPayload { id: string; data: unknown; } interface IIpcResponse { id: string; success: boolean; data?: unknown; // just the error message error?: string; } interface ICredentials { name: string; password: string; } interface IIpcClient { ask: (channel: IpcChannel, data?: unknown) => Promise; } type IpcHandler = (data?: unknown) => Promise; interface IIpcController { get(): IIpcController; }