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

Await top level promise

$
0
0

If you need to await a function that returns something, it’s common to assign it to _ to discard the return value

let _ = await promiseFn()

This will compile directly to await promiseFn(); which also works at the top level


Viewing all articles
Browse latest Browse all 1760

Trending Articles