Interface IHooksArray

Type for the Values stored in the Reflection for Hooks

Example

const postHooks: IHooksArray[] = Array.from(Reflect.getMetadata(DecoratorKeys.HooksPost, target) ?? []);
interface IHooksArray {
    func: Func;
    methods: (string | RegExp)[];
    options?: MiddlewareOptions;
}

Properties

Properties

func: Func

The Function to add as a hooks

methods: (string | RegExp)[]

The Method to where this hook gets triggered

Options for Hooks