gypsum
Version:
Simple and easy lightweight typescript server side framework on Node.js.
17 lines (16 loc) • 453 B
TypeScript
import { Context } from "../context";
export interface IHookFunc {
(ctx: Context, ...args: any[]): void;
}
export interface IHook extends IHookFunc {
__name: string;
isHook: boolean;
private: boolean;
}
export declare type IHookOptions = string | {
name: string;
args?: any;
};
export declare function HOOK(options?: {
private: boolean;
}): (target: any, key: string, descriptor: PropertyDescriptor) => void;