Package: effect
Module: Function
Represents a function with multiple arguments.
When to use
Use to describe a function whose argument list is represented as a tuple type.
Example (Typing a variadic function)
import type { Function } from "effect"
import * as assert from "node:assert"
const sum: Function.FunctionN<[number, number], number> = (a, b) => a + b
assert.deepStrictEqual(sum(2, 3), 5)
Signature
type FunctionN<A, B> = (...args: A) => B
Since v2.0.0