@eklabdev/blingts4
Version:
A comprehensive TypeScript decorators library implementing Stage 2 decorators for TS 4.9+
17 lines (16 loc) • 883 B
TypeScript
import { EffectContext } from '../../types';
/**
* Executes a function before the decorated method
* @param fn Function to execute before the method
*/
export declare function EffectBefore(fn: (context: EffectContext) => unknown): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
/**
* Executes a function after the decorated method
* @param fn Function to execute after the method
*/
export declare function EffectAfter(fn: (context: EffectContext) => unknown): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
/**
* Executes a function when the decorated method throws an error
* @param fn Function to execute on error
*/
export declare function EffectError(fn: (context: EffectContext) => unknown): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;