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:
514 bytes
|
Line | |
---|
1 | import { Function } from './Function';
|
---|
2 | import { Parameters } from './Parameters';
|
---|
3 | import { Return } from './Return';
|
---|
4 | import { 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 | */
|
---|
16 | export declare type Promisify<F extends Function> = (...args: Parameters<F>) => Promise<Return<F>>;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.