function Fn
Fn<F extends ((..._: unknown[]) => unknown)>(
fn: F,
...args: Partial<Parameters<F>>,
)

Partial application of a function. Use this to prepare a function with arguments for testing.

See:

Example:

// A function with 2 arguments:
const result = await fn(arg1, arg2)
const check = result => ok(result > 0)
check(result)

// Is tested like this:
expect("description",
  curry(fn, arg1, arg2),
  check)

Type Parameters

F extends ((..._: unknown[]) => unknown)

Parameters

fn: F
...args: Partial<Parameters<F>>

Return Type

type alias Fn

Gradually elaboratable function type.

Type Parameters

Inputs extends unknown[] = unknown[]
Output = unknown

Definition