export declare function MagicEvent<D>(type: string): {
    new (name: string, options: CustomEventInit<D> & {
        detail: D;
    }): {
        readonly detail: D;
        initCustomEvent(type: string, bubbles?: boolean | undefined, cancelable?: boolean | undefined, detail?: D | undefined): void;
        readonly bubbles: boolean;
        cancelBubble: boolean;
        readonly cancelable: boolean;
        readonly composed: boolean;
        readonly currentTarget: EventTarget | null;
        readonly defaultPrevented: boolean;
        readonly eventPhase: number;
        readonly isTrusted: boolean;
        returnValue: boolean;
        readonly srcElement: EventTarget | null;
        readonly target: EventTarget | null;
        readonly timeStamp: number;
        readonly type: string;
        composedPath(): EventTarget[];
        initEvent(type: string, bubbles?: boolean | undefined, cancelable?: boolean | undefined): void;
        preventDefault(): void;
        stopImmediatePropagation(): void;
        stopPropagation(): void;
        readonly NONE: 0;
        readonly CAPTURING_PHASE: 1;
        readonly AT_TARGET: 2;
        readonly BUBBLING_PHASE: 3;
    };
    readonly type: string;
    readonly target: (target: EventTarget) => {
        dispatch(detail: D, options?: Partial<import("./magical.js").DispatchOptions> | undefined): void;
        listen(listener: (event: {
            readonly detail: D;
            initCustomEvent(type: string, bubbles?: boolean | undefined, cancelable?: boolean | undefined, detail?: D | undefined): void;
            readonly bubbles: boolean;
            cancelBubble: boolean;
            readonly cancelable: boolean;
            readonly composed: boolean;
            readonly currentTarget: EventTarget | null;
            readonly defaultPrevented: boolean;
            readonly eventPhase: number;
            readonly isTrusted: boolean;
            returnValue: boolean;
            readonly srcElement: EventTarget | null;
            readonly target: EventTarget | null;
            readonly timeStamp: number;
            readonly type: string;
            composedPath(): EventTarget[];
            initEvent(type: string, bubbles?: boolean | undefined, cancelable?: boolean | undefined): void;
            preventDefault(): void;
            stopImmediatePropagation(): void;
            stopPropagation(): void;
            readonly NONE: 0;
            readonly CAPTURING_PHASE: 1;
            readonly AT_TARGET: 2;
            readonly BUBBLING_PHASE: 3;
        }) => void, options?: boolean | AddEventListenerOptions | undefined): () => void;
    };
};
