UNPKG

@eggjs/aop-decorator

Version:
23 lines (22 loc) 1 kB
import { PointcutType } from '@eggjs/tegg-types'; import type { CustomPointcutCallback, EggProtoImplClass, PointcutInfo } from '@eggjs/tegg-types'; export declare class ClassPointInfo implements PointcutInfo { readonly type = PointcutType.CLASS; readonly clazz: EggProtoImplClass; readonly method: PropertyKey; constructor(clazz: EggProtoImplClass, method: PropertyKey); match(clazz: EggProtoImplClass, method: PropertyKey): boolean; } export declare class NamePointInfo implements PointcutInfo { readonly type = PointcutType.NAME; readonly className: RegExp; readonly methodName: RegExp; constructor(className: RegExp, methodName: RegExp); match(clazz: EggProtoImplClass, method: PropertyKey): boolean; } export declare class CustomPointInfo implements PointcutInfo { readonly type = PointcutType.CUSTOM; readonly cb: CustomPointcutCallback; constructor(cb: CustomPointcutCallback); match(clazz: EggProtoImplClass, method: PropertyKey): boolean; }