Skip to main content
variable ary
import { ary } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Creates a function that accepts up to n arguments, ignoring any additional arguments.

Call the provided function, fn, with up to n arguments, using Array.prototype.slice(0, n) and the spread operator (...).

type

<T = any>(fn: (...args: T[]) => any, n: number) => unknown