Skip to content

safeAwaitFn

作用同safeAwait

作为一个高阶函数使用

Demo

ts
import { 
safeAwaitFn
} from '@vill-v/async'
const
test
=
safeAwaitFn
(async ()=>{
await
Promise
.
reject
()
})

DTS

ts

declare function safeAwaitFn(fn: (...args: any[]) => Promise<any>): (...args: any[]) => void;

Released under the MIT License.