ReScript @rescript-lang.org · Nov 19

ReScript ships with native async/await support that also compiles to async/await in JavaScript. You can pattern match directly on the await, and handle errors in the pattern match as well. No need to wrap things manually in try/catch, the compiler still emits the right thing.

26 likes 2 replies

?

Replies

@spicy-chebrec.bsky.social · Nov 19

okay, that's sick!

Sean Newell · Nov 19

Nice! That throw err in the catch's failure case seems sus. What would it look like to handle all errors to guarantee that final console log?