@eggjs/tegg-types
Version:
tegg types
29 lines (28 loc) • 936 B
TypeScript
import type { EggProtoImplClass } from '../core-decorator/index.js';
import type { AdviceInfo } from './Aspect.js';
import type { CustomPointcutCallback, PointcutInfo, PointcutType } from './Pointcut.js';
export interface CrosscutOptions {
order?: number;
adviceParams?: any;
}
export interface ClassCrosscutParam {
type: PointcutType.CLASS;
clazz: EggProtoImplClass;
methodName: PropertyKey;
}
export interface NameCrosscutParam {
type: PointcutType.NAME;
className: RegExp;
methodName: RegExp;
}
export interface CustomCrosscutParam {
type: PointcutType.CUSTOM;
callback: CustomPointcutCallback;
}
export type CrosscutParam = ClassCrosscutParam | NameCrosscutParam | CustomCrosscutParam;
export declare const CROSSCUT_INFO_LIST: unique symbol;
export declare const IS_CROSSCUT_ADVICE: unique symbol;
export interface CrosscutInfo {
pointcutInfo: PointcutInfo;
adviceInfo: AdviceInfo;
}