Interface IInterceptorsStorage<M>

interface IInterceptorsStorage<M> {
    addInterceptor<K extends string | number | symbol>(
        interceptorType: K,
        interceptor: Interceptor<M[K]>,
    ): void;
    executeInterceptors<K extends string | number | symbol>(
        interceptorType: K,
        payload: M[K],
    ): Promise<M[K]>;
    getInterceptorsSet<K extends string | number | symbol>(
        interceptorType: K,
    ): Set<Interceptor<M[K]>>;
    removeAllInterceptors(): void;
    removeAllInterceptorsForType<K extends string | number | symbol>(
        interceptorType: K,
    ): void;
    removeInterceptor<K extends string | number | symbol>(
        interceptorType: K,
        interceptor: Interceptor<M[K]>,
    ): void;
}

Type Parameters

  • M

Methods