fullstacksjs / toolbox

A zero-dependency 📦 tree-shakable🌲 collection of missing JavaScript utilities.
https://toolbox.fullstacksjs.com/
MIT License
56 stars 15 forks source link

AsyncVoidFn #35

Closed ASafaeirad closed 8 months ago

ASafaeirad commented 1 year ago

It would be useful to have an AsyncVoidFunction type.

Motivation

There is a VoidFunction type in the toolbox, but the function may be async at times. Because it does not raise the bundle size, we may include this utility function to have cleaner code.

Definition

type AsyncVoidFn = () => Promise<void>