Browse Source

refactor: improve hook types

e22m4u 1 month ago
parent
commit
eb7ee7f93a
1 changed files with 14 additions and 0 deletions
  1. 14 0
      src/hooks/hook-registry.d.ts

+ 14 - 0
src/hooks/hook-registry.d.ts

@@ -66,6 +66,20 @@ export declare class HookRegistry extends DebuggableService {
    */
   hasHook(type: HookType, hook: RouterHook): boolean;
 
+  /**
+   * Get hooks.
+   *
+   * @param type
+   */
+  getHooks(type: typeof HookType.PRE_HANDLER): PreHandlerHook[];
+
+  /**
+   * Get hooks.
+   *
+   * @param type
+   */
+  getHooks(type: typeof HookType.POST_HANDLER): PostHandlerHook[];
+
   /**
    * Get hooks.
    *