UNPKG
await-to-js
Version:
latest (3.0.0)
3.0.0
2.1.1
2.1.0
2.0.1
2.0.0
1.0.1
1.0.0
Async/await wrapper for easy error handling in js
github.com/scopsy/await-to-js
scopsy/await-to-js
await-to-js
/
dist
/
types
/
await-to-js.d.ts
8 lines
(7 loc)
•
286 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
/** *
@param
{
Promise
}
promise
*
@param
{
Object=
}
errorExt
- Additional Information you can pass to the err object *
@return
{
Promise
} */
export
declare
function
to<T, U =
Error
>(
promise
:
Promise
<T>,
errorExt
?:
object
):
Promise
<[U,
undefined
] | [
null
, T]>;
export
default
to;