the argument list to be supplied... the argument list of the function supplied to the to
clause (see below) should match this list
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
Type-enforcing right-to-left function composition function. The last parameter (i.e. the first function to be evaluated) in the argument list can be a function of any arity, but the remaining parameters must be unary functions. The return type of one function must be compatible with the argument of previous function in the argument list (i.e. types flow from right-to-left)
A function with the arguments of the last function in the argument list and a return type of the first function in the argument list
Curry 1st parameter of a function
a function of form (p0: P0, p1: P1, p2: P2) => R
a function of form (p1: P1, p2: P2) => (p0: P0) => R
Type-enforcing left-to-right function composition function. The first parameter can be a function of any arity, but the remaining parameters must be unary functions. The return type of one function must be compatible with the argument of next function in the argument list (i.e. types flow from left-to-right)
A function with the arguments of the first function in the argument list and a return type of the last function in the argument list
pipeInto(src, f1, f2)
is shorthand for applyArgs(src).to(pipe(f1, f2))
Generated using TypeDoc
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 ofx
is correctly inferred to benumber