Options
All
  • Public
  • Public/Protected
  • All
Menu

ts-functional-pipe

Index

Type aliases

Func<TArgs, TOut>: (...args: TArgs) => TOut

Type parameters

  • TArgs: any[]

  • TOut

Type declaration

    • (...args: TArgs): TOut
    • Parameters

      • Rest ...args: TArgs

      Returns TOut

UnaryFunction<TIn, TOut>: Func<[TIn], TOut>

Type parameters

  • TIn

  • TOut

Functions

  • applyArgs<A>(...args: A): To<A>
  • Helper function to apply arguments to a selected function with type-inference for the supplied function. For instance, in the following statement applyArg(1).to((x) => x + 1), the type of x is correctly inferred to be number

    Type parameters

    • A: any[]

    Parameters

    • Rest ...args: A

      the argument list to be supplied... the argument list of the function supplied to the to clause (see below) should match this list

    Returns To<A>

    an object with a single method, .to(f) where f is the function to which param (...args) will be passed. The return type of this method will match the return type of f

  • deferP0<A, R>(fn: (...args: A) => R): (...args: Tail<A>) => (...src: HeadAsTuple<A>) => R
  • Curry 1st parameter of a function

    Type parameters

    • A: readonly unknown[]

    • R

    Parameters

    • fn: (...args: A) => R

      a function of form (p0: P0, p1: P1, p2: P2) => R

        • (...args: A): R
        • Parameters

          • Rest ...args: A

          Returns R

    Returns (...args: Tail<A>) => (...src: HeadAsTuple<A>) => R

    a function of form (p1: P1, p2: P2) => (p0: P0) => R

      • (...args: Tail<A>): (...src: HeadAsTuple<A>) => R
      • Parameters

        • Rest ...args: Tail<A>

        Returns (...src: HeadAsTuple<A>) => R

          • (...src: HeadAsTuple<A>): R
          • Parameters

            • Rest ...src: HeadAsTuple<A>

            Returns R

Generated using TypeDoc