UNPKG
mocoolka-function
Version:
latest (0.1.7)
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
Function lib for function.
mocoolka-function
/
lib
/
thunk.d.ts
10 lines
(9 loc)
•
297 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
/** * The convert callback function to promise function *
@param
target
*
@param
context
*
@param
resolver
*
@return
{
Promise<T>
} */
declare
const
thunk
: <T>
(
target
:
Function
,
context
?:
any
,
resolver
?: (() => T) |
undefined
) =>
(
...
args
:
any
[]
) =>
Promise
<T>;
export
default
thunk;