import { Cancellable } from '../events'; import { ViewHookExecutor } from './hooks'; import { ViewContainer } from './ViewContainer'; export declare type CustomViewHookExecutor = (container: ViewContainer, executor: ViewHookExecutor, event: CustomViewHookEvent) => any; export interface CustomViewHookEventArgs { /** * The name of the method to invoke. * @type {string} */ name: string; /** * The argument to provide to the hook. This supports a {@link ForwardRef} * if the argument needs to be resolved lazily. * @type {T} */ arg: T; /** * Invoked if custom execution logic is required. This method is provided the * {@link ViewHookExecutor} in order to perform the hook invocation. * @type {CustomViewHookExecutor} */ execute?: CustomViewHookExecutor; } /** * Invokes a custom view hook on any views that receive this event. * @export * @class CustomViewHookEvent * @extends {Cancellable} * @template T */ export declare class CustomViewHookEvent extends Cancellable { private _config; constructor(_config: CustomViewHookEventArgs); /** * Custom invocation method. * @readonly * @type {(CustomViewHookExecutor|null)} */ readonly execute: CustomViewHookExecutor | null; /** * Name of the method to invoke. * @readonly * @type {string} */ readonly name: string; /** * The argument to provide to the hook. * @readonly * @type {(T|null)} */ readonly arg: T | null; }