@villedemontreal/workit-core
Version:
This package provides default and no-op implementations of the WorkIt types for client packages.
13 lines (12 loc) • 628 B
TypeScript
import { IMessage, Interceptor } from '@villedemontreal/workit-types';
export declare class Interceptors {
static sanitize: (interceptors: Interceptor | Interceptor[] | undefined) => Interceptor[] | undefined;
/**
* It will execute all interceptors concurrently (limited by INTERCEPTOR_ASYNC_LIMIT env, default 3)
* body message will be untouched
* properties will be merged from all returned messages
*/
static execute<T extends IMessage>(interceptors: Interceptor | Interceptor[] | undefined, message: T): Promise<T>;
private static _internalExecute;
private static _validateMessage;
}