rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Add Promise.sleep to std

Open nojaf opened this issue 3 months ago • 3 comments

I add let sleep = ms => Promise.make((resolve, _) => setTimeout(resolve, ms)->ignore) to a lot of my projects.

Would like to have this in the standard library.

nojaf avatar Sep 12 '25 09:09 nojaf

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@7880
@rescript/darwin-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@7880
@rescript/darwin-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@7880
@rescript/linux-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@7880
@rescript/linux-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@7880
@rescript/runtime

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/runtime@7880
@rescript/win32-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@7880

commit: 4f5e154

pkg-pr-new[bot] avatar Sep 12 '25 11:09 pkg-pr-new[bot]

@cknitt, there's no need for me to hold up the release for this. We can revisit and possibly merge it later.

nojaf avatar Sep 12 '25 13:09 nojaf

Yes, thanks, already proceeding with the release!

cknitt avatar Sep 12 '25 13:09 cknitt