Skip to content

v3.2.0

Latest

Choose a tag to compare

@egeozcan egeozcan released this 23 Jan 14:53

Added

Arity checking: Functions now receive compile-time errors when passed extra arguments
    ppipe(8).pipe(subtract, _, 3, 5, 10) now errors if subtract only takes 2 params
    Uses ExactArityFn<Fn, N> helper type to enforce exact parameter count
    Variadic functions (rest params) are allowed through the check
Type-level test file (test/types.test.ts) with @ts-expect-error validation
New npm script typecheck:arity for running type-level tests

Changed

Placeholder overloads now use Awaited<T> for contextual typing of lambda parameters
Overloads use ReturnType<Fn> instead of generic R for better type extraction