import { CfgIOWarningSupplier } from "./CfgIOWarningSupplier"; declare type ConfiguraAttribute = "C0nf1gura"; declare type ConfiguraShebang = "arug1fn0C"; declare const CONFIGURA_ATTRIBUTE: ConfiguraAttribute; export declare type IOManagerListener = (data: unknown) => Promise; /** * The container format used when the environment is globally shared with things * outside our control. The "shebang" is a magic string that should prevent from a * CfgIOContainer being confused with something else. */ export declare type CfgIOContainer = { [CONFIGURA_ATTRIBUTE]: ConfiguraShebang; messages: { [index: string]: unknown; }; }; /** * Base class for classes handling input and output in globally shared environments. */ export declare abstract class CfgIOManager { private _warningSuppliers; addWarningSupplier(supplier: CfgIOWarningSupplier): void; removeWarningSupplier(supplier: CfgIOWarningSupplier): void; getWarnings(): string[]; /** * Listen for the message messageKey being received. */ listenForMessage(l: IOManagerListener, messageKey: string): boolean; /** * Removes the listener */ stopListenForMessage(l: IOManagerListener): boolean; static isIOContainer: (data: unknown) => data is CfgIOContainer; static hasIOContainerMessageKey: (container: CfgIOContainer, messageKey: string) => boolean; static getMessageFromIOContainer: (container: unknown, messageKey: string) => unknown; static makeContainer: (messages: { [index: string]: unknown; }) => CfgIOContainer; private _receiveInProgress; private static _inhibitAllReceive; get receiveInProgress(): boolean; private _messageListeners; private _getIndexOfMessageListener; get hasMessageListeners(): boolean; protected _containerListener(data: unknown): void; /** * Send the data with messageKey. This can for example be pushing or * replacing on the history stack or sending a message using the * window.message API. */ abstract send(messageKey: string, data: S): void; } export {}; //# sourceMappingURL=CfgIOManager.d.ts.map