import { Handler } from '../../handler'; import { WordPressHookSystem } from '../WordpressHookSystem'; declare type BaseRepoInfo = { method: string; priority: number; hookGetter: () => WordPressHookSystem; }; declare type BaseActionRepoInfo = BaseRepoInfo & { action: string; }; declare type BaseFilterRepoInfo = BaseRepoInfo & { filter: string; }; declare type RegisteredInfo = T & { handler: Handler; }; export interface IWPHookSubscriber { /** * Contains all registered actions from decorators (internal use only) */ __wpActionListeners: BaseActionRepoInfo[]; /** * Contains all registered filters from decorators (internal use only) */ __wpFilterListeners: BaseFilterRepoInfo[]; /** * Class specific hook system to be used with all the decorators. */ hookSystem?: WordPressHookSystem; /** * Initialize class with decorated methods. * @return {Promise} */ hookMethods(): Promise; /** * Unregister all registered hooks * @return {Promise} */ unHook(): Promise; } /** * Class decorator or mixin to add subscriber functionalities to class. * To be used with OnWPAction and OnWPFilter */ export declare function WPHooksSubscriber(constructor: T): { new (...args: any[]): { __wpActionListeners: BaseActionRepoInfo[]; __wpFilterListeners: BaseFilterRepoInfo[]; __wpuid: string; _registered_actions: RegisteredInfo[]; _registered_filters: RegisteredInfo[]; hookSystem?: WordPressHookSystem; hookMethods(): Promise; unHook(): Promise; }; } & T; export {};