UNPKG

514 BTypeScriptView Raw
1import { Function } from './Function';
2import { Parameters } from './Parameters';
3import { Return } from './Return';
4import { Promise } from '../Any/Promise';
5/**
6 * Creates a promisified version of a `Function` `F`
7 * @param F to promisify
8 * @returns async F
9 * @example
10 * ```ts
11 * import {F} from 'ts-toolbelt'
12 *
13 * type test0 = F.Promisify<(a: number) => number> // (a: number) => Promise<number>
14 * ```
15 */
16export declare type Promisify<F extends Function> = (...args: Parameters<F>) => Promise<Return<F>>;