/**
 * The following code is modified based on
 * https://github.com/webpack/webpack-dev-server
 *
 * MIT Licensed
 * Author Tobias Koppers @sokra
 * Copyright (c) JS Foundation and other contributors
 * https://github.com/webpack/webpack-dev-server/blob/main/LICENSE
 */
type Message = Error & {
    file?: string;
    moduleName?: string;
    moduleIdentifier?: string;
    loc?: string;
    message?: string;
    stack?: string | string[];
};
type Event = {
    type: string;
} & Record<string, any>;
type StateMachine = {
    send: (event: Event) => void;
};
declare const formatProblem: (type: "warning" | "error", item: string | Message) => {
    header: string;
    body: string;
};
type CreateOverlayOptions = {
    /** Trusted types policy name. If false, disables trusted types. */
    trustedTypesPolicyName?: false | string;
    /** Runtime error catcher. If boolean, enables/disables catching. If function, handles the error. */
    catchRuntimeError?: boolean | ((error: Error) => void);
};
type OverlayTrustedTypePolicy = {
    createHTML: (value: string) => string;
};
declare global {
    interface Window {
        trustedTypes?: {
            createPolicy: (name: string, policy: {
                createHTML: (value: string) => string;
            }) => OverlayTrustedTypePolicy;
        };
    }
}
declare const createOverlay: (options: CreateOverlayOptions) => StateMachine;
export { createOverlay, formatProblem };
