Type alias TLimitedOptions

TLimitedOptions: {
    activeTasks: Set<string>;
    assignControlFunction: ((args, functions) => any[]);
    awaitingTasks: Set<string>;
    callbackBetween?: (() => Promise<void>);
    emitter: EventEmitter;
    functionId: string;
    getLock: ((functionId, newTaskId) => boolean);
    lastDone: number;
    loggerLevel: false | LoggerLevel;
    mapping: {
        [index: string]: ((...args) => Promise<any>);
    };
    maxParallel: number;
    minDelay: number;
    queue: [string, string, any[]][];
}

The options for call

Type declaration

  • activeTasks: Set<string>

    An overview with active Tasks. This is relevant for multiple Funtions.

  • assignControlFunction: ((args, functions) => any[])
      • (args, functions): any[]
      • Helper to assign the control function, for example on an async function.

        Parameters

        • args: any[]
        • functions: {
              continueTask: (() => void);
              pauseTask: (() => void);
          }
          • continueTask: (() => void)
              • (): void
              • Returns void

          • pauseTask: (() => void)
              • (): void
              • Returns void

        Returns any[]

  • awaitingTasks: Set<string>

    An overview with active Tasks. This is relevant for multiple Funtions.

  • Optional callbackBetween?: (() => Promise<void>)
      • (): Promise<void>
      • An additional function, wich can be used between the next function in is called. e.g. sleep.

        Returns Promise<void>

  • emitter: EventEmitter

    An emitter to use.

  • functionId: string

    The Id to use. If not provided, an specific id is generated

  • getLock: ((functionId, newTaskId) => boolean)
      • (functionId, newTaskId): boolean
      • Helper function to request a lock.

        Parameters

        • functionId: string
        • newTaskId: string

        Returns boolean

  • lastDone: number
  • loggerLevel: false | LoggerLevel

    A logger to use.

  • mapping: {
        [index: string]: ((...args) => Promise<any>);
    }

    Mapping for the Functions.

    • [index: string]: ((...args) => Promise<any>)
        • (...args): Promise<any>
        • Parameters

          • Rest ...args: any

          Returns Promise<any>

  • maxParallel: number

    Number of elements, which could be called in parallel. 0 = sequntial

  • minDelay: number
  • queue: [string, string, any[]][]

    An queue that should be used. If not provided, a queue is used.

Generated using TypeDoc