Interface Strategy<Type, Data, CustomHeaders, CustomOptions>

Base class for strategies

interface Strategy<
    Type extends string = string,
    Data = any,
    CustomHeaders extends Record<string, any> = AnyHeaders,
    CustomOptions extends Record<string, any> = AnyOptions,
> {
    do: (
        process: JobObject<Type, Data, CustomHeaders, CustomOptions>,
    ) => JobObject<Type, Data, CustomHeaders, CustomOptions>;
    name: string;
}

Type Parameters

  • Type extends string = string
  • Data = any
  • CustomHeaders extends Record<string, any> = AnyHeaders
  • CustomOptions extends Record<string, any> = AnyOptions

Properties

Properties

Perform the filter of the data based in concrete criteria

Type declaration

name: string

Strategy name