import { Definitions } from "./definition";
import { EventName } from "../_types/events";
import { Triggers } from "../_types/triggers";
export declare namespace Typings {
    type TriggerHandlerProps<TName extends keyof Triggers> = {
        event: TName extends keyof Triggers ? Triggers[TName]["event"] : any;
    };
    type Props<TName extends keyof Triggers = keyof Triggers> = {
        name: TName;
        description?: string;
        events: EventName[];
        /**
         * Handler function that receives the matched event
         */
        handler: (props: TriggerHandlerProps<TName>) => Promise<void> | void;
    };
    const Primitive: "trigger";
}
export declare class Trigger<TName extends keyof Triggers> implements Definitions.Primitive {
    readonly name: TName;
    readonly description: string | undefined;
    readonly events: EventName[];
    readonly handler: Typings.Props<TName>["handler"];
    constructor(props: Typings.Props<TName>);
}
//# sourceMappingURL=trigger.d.ts.map