UNPKG

@eggjs/tegg-types

Version:
26 lines (25 loc) 708 B
import type { EggProtoImplClass } from '../core-decorator/index.js'; export interface PointcutOptions<K = any> { order?: number; adviceParams?: K; } export declare enum PointcutType { /** * use class type to match */ CLASS = "CLASS", /** * use regexp to match className and methodName */ NAME = "NAME", /** * use custom function to match */ CUSTOM = "CUSTOM" } export interface PointcutInfo { type: PointcutType; match(clazz: EggProtoImplClass, method: PropertyKey): boolean; } export type CustomPointcutCallback = (clazz: EggProtoImplClass, method: PropertyKey) => boolean; export declare const POINTCUT_ADVICE_INFO_LIAR: unique symbol;