import type { IActionAwareIoHost, IIoHost } from '../io-host'; import type { IoMessage, IoRequest } from '../io-message'; import type { ToolkitAction } from '../toolkit-action'; import { IoDefaultMessages } from './io-default-messages'; import type { SpanEnd, SpanDefinition } from './span'; import { SpanMaker } from './span'; export type ActionLessMessage = Omit, 'action'>; export type ActionLessRequest = Omit, 'action'>; /** * A class containing helper tools to interact with IoHost */ export declare class IoHelper implements IIoHost, IActionAwareIoHost { static fromIoHost(ioHost: IIoHost, action: ToolkitAction): IoHelper; static fromActionAwareIoHost(ioHost: IActionAwareIoHost): IoHelper; /** * Simplified access to emit default messages. */ readonly defaults: IoDefaultMessages; private readonly ioHost; private constructor(); /** * Forward a message to the IoHost, while injection the current action */ notify(msg: ActionLessMessage): Promise; /** * Forward a request to the IoHost, while injection the current action */ requestResponse(msg: ActionLessRequest): Promise; /** * Create a new marker from a given registry entry */ span(definition: SpanDefinition): SpanMaker; } /** * Wraps an IoHost and creates an IoHelper from it */ export declare function asIoHelper(ioHost: IIoHost, action: ToolkitAction): IoHelper; //# sourceMappingURL=io-helper.d.ts.map