Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace IterableCallChain

A call chain transforming elements of iterable.

Transformations performed when transformed element requested from final iterable.

Index

Type aliases

Methods

Type aliases

Args

Args<Return, Return>:

Type parameters

  • Return

  • Return

OrSkip

OrSkip<Return, Or>: Or

Type parameters

  • Return

  • Or

Out

Out<Return, Or, Return>:

Type parameters

  • Return

  • Or

  • Return

Methods

call

  • call<Args>(pass: (this: void, ...args: Args) => any, args: Args): void
  • Calls a pass in this chain with the given arguments.

    When this is called for the last pass, the final result would be an args tuple.

    Type parameters

    • Args: any[]

      Pass arguments tuple type.

    Parameters

    • pass: (this: void, ...args: Args) => any

      A pass to call.

        • (this: void, ...args: Args): any
        • Parameters

          • this: void
          • Rest ...args: Args

          Returns any

    • args: Args

      An array of arguments for the call.

    Returns void

iterate

  • iterate<Item>(pass: (this: void, arg: Item) => any, iterable: Iterable<Item>): void
  • Calls a pass in this chain with each element of the given iterable.

    Type parameters

    • Item

      A type of element of iterable.

    Parameters

    • pass: (this: void, arg: Item) => any

      A pass to call.

        • (this: void, arg: Item): any
        • Parameters

          • this: void
          • arg: Item

          Returns any

    • iterable: Iterable<Item>

      Source iterable.

    Returns void

pass

  • pass<Arg>(pass: (this: void, arg: Arg) => any, arg: Arg): void
  • Calls a pass in this chain with the given argument.

    When this is called for the last pass, the final result would be arg.

    typeparam

    Pass argument type.

    Type parameters

    • Arg

    Parameters

    • pass: (this: void, arg: Arg) => any

      A pass to call.

        • (this: void, arg: Arg): any
        • Parameters

          • this: void
          • arg: Arg

          Returns any

    • arg: Arg

      Single argument for the call.

    Returns void

skip

  • skip(result?: any): void
  • Skips the rest of the passes.

    Parameters

    • Optional result: any

      Call chain result.

    Returns void

Generated using TypeDoc