UNPKG

@nova-ts/context

Version:

A TypeScript library for Dependency Injection

10 lines (7 loc) 521 B
import { ExecutionContext } from '../Types/ExcutionContext.js'; declare const METHOD_HOOKS_KEY = "nova:method_hooks"; declare const CLASS_HOOKS_KEY = "nova:class_hooks"; type HookFunction = (context: ExecutionContext, proceed: () => Promise<any>) => Promise<any>; declare function addMethodHook(target: any, methodName: string, hook: HookFunction): void; declare function addClassHook(target: any, hook: HookFunction): void; export { CLASS_HOOKS_KEY, type HookFunction, METHOD_HOOKS_KEY, addClassHook, addMethodHook };