/// <reference types="@adonisjs/application/build/adonis-typings/application" />
declare type HooksHandler = (...args: any[]) => void | Promise<void>;
/**
 * Exposes the API to register before/after lifecycle hooks for a given action
 * with option to resolve handlers from the IoC container.
 *
 * The hooks class doesn't provide autocomplete for actions and the arguments
 * the handler will receive, since we expect this class to be used internally
 * for user facing objects.
 */
export declare class Hooks {
    private resolver?;
    private hooks;
    constructor(resolver?: import("@ioc:Adonis/Core/Application").IocResolverContract<import("@ioc:Adonis/Core/Application").ContainerBindings> | undefined);
    /**
     * Raise exceptins when resolver is not defined
     */
    private ensureResolver;
    /**
     * Resolves the hook handler using the resolver when it is defined as string
     * or returns the function reference back
     */
    private resolveHandler;
    /**
     * Returns handlers set for a given action or undefined
     */
    private getActionHandlers;
    /**
     * Adds the resolved handler to the actions set
     */
    private addResolvedHandler;
    /**
     * Returns a boolean whether a handler has been already registered or not
     */
    has(lifecycle: 'before' | 'after', action: string, handler: HooksHandler | string): boolean;
    /**
     * Register hook handler for a given event and lifecycle
     */
    add(lifecycle: 'before' | 'after', action: string, handler: HooksHandler | string): this;
    /**
     * Remove a pre-registered handler
     */
    remove(lifecycle: 'before' | 'after', action: string, handler: HooksHandler | string): void;
    /**
     * Remove all handlers for a given action or lifecycle. If action is not
     * defined, then all actions for that given lifecycle are removed
     */
    clear(lifecycle: 'before' | 'after', action?: string): void;
    /**
     * Merges hooks of a given hook instance. To merge from more than
     * one instance, you can call the merge method for multiple times
     */
    merge(hooks: Hooks): void;
    /**
     * Executes the hook handler for a given action and lifecycle
     */
    exec(lifecycle: 'before' | 'after', action: string, ...data: any[]): Promise<void>;
}
export {};
