import { Action, Removable, Result } from "@tmorin/ceb-messaging-core"; /** * The metadata of an IPC message. */ export interface IpcMessageMetadata { /** * When `true`, the execution blocks to wait for a {@link Result}. */ waitForResult?: boolean; /** * It's the max time to wait for a result. */ timeout?: number; /** * It's the action identifier which leads to the {@link Result}. */ correlationId?: string; } /** * Create a {@link Removable} with a callback * @param callback the callback */ export declare function createRemovable(callback: () => any): Removable; /** * Create an Error Result. * @param action the action * @param error the error */ export declare function createErrorResult(action: Action, error: any): Result; export declare namespace createErrorResult { var MESSAGE_TYPE: string; } /** * The IPC channel for commands and their results. */ export declare const IPC_CHANNEL_COMMANDS = "commands"; /** * The IPC channel for queries and their results. */ export declare const IPC_CHANNEL_QUERIES = "queries"; /** * The IPC channel for events. */ export declare const IPC_CHANNEL_EVENTS = "events";