saga-transaction-lib
Version:
A TypeScript library for implementing the Saga pattern to manage distributed transactions and complex workflows
7 lines (6 loc) • 420 B
TypeScript
export type OptionBeforeInvoke<T, CLS> = {
instance: CLS;
context: T;
};
export declare function BeforeInvoke<CLS, T>(fn?: (option: OptionBeforeInvoke<T, CLS>) => Promise<boolean> | boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
export declare function BeforeRevoke(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;