Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Promise helper name

$
0
0

Hi folks, I would like to add helper function to the standard library for Promises:

module Promise = {
    let xyz = ms => Promise.make((resolve, _) => setTimeout(resolve, ms)->ignore)
}

Usage:

let bar = async () => {
   await Promise.xyz(1000)
   42
}

What would you call xyz?
Please upvote any previous answer you agree on instead of posting it again.


Viewing all articles
Browse latest Browse all 2592

Trending Articles