source: node_modules/ts-toolbelt/out/Function/UnCurry.d.ts

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 646 bytes
Line 
1import { Curry } from './Curry';
2/**
3 * Undoes the work that was done by [[Curry]]
4 * @param F to uncurry
5 * @returns [[Function]]
6 * @example
7 * ```ts
8 * import {F} from 'ts-toolbelt'
9 *
10 * type test0 = F.Curry<(a: string, b: number) => boolean>
11 * declare const foo: test0
12 * const res0 = foo('a') // F.Curry<(b: number) => boolean> & ((b: number) => boolean)
13 *
14 * type test1 = F.UnCurry<test0> // (a: string, b: number) => boolean
15 * declare const bar: test1
16 * const res1 = bar('a') // TS2554: Expected 2 arguments, but got 1.
17 * ```
18 * @ignore
19 */
20export declare type UnCurry<F extends Curry<any>> = F extends Curry<infer UF> ? UF : never;
Note: See TracBrowser for help on using the repository browser.