Skip to main content
Module

x/ts_toolbelt_unofficial/mod.ts>Function.Curry

👷 TypeScript's largest type utility library, now on Deno
Latest
type alias Function.Curry
import { type Function } from "https://deno.land/x/ts_toolbelt_unofficial@1.1.0/mod.ts";
const { Curry } = Function;

Curry a [[Function]]

Examples

Example 1

import {F} from 'ts-toolbelt.ts'

/// If you are looking for creating types for `curry`
/// It handles placeholders and variable arguments
declare function curry<Fn extends F.Function>(fn: Fn): F.Curry<Fn>
definition: <P extends Gaps<Parameters<F>>, G extends List = GapsOf<P, Parameters<F>>, R extends any = Return<F>>(...p: Gaps<Parameters<F>> | P) => RequiredKeys<G> extends never ? R : Curry<(...p: G) => R>