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

[RFC] Early return

Open cknitt opened this issue 2 months ago • 2 comments

To get the ball rolling, here is a design document authored by Codex.

cknitt avatar Sep 30 '25 07:09 cknitt

If the feature is difficult in terms of implementation, we can start by making a return type annotation required for it to work. I'm not sure about the details, but it feels like it should simplify things quite a lot. This would still be a great addition.

DZakh avatar Sep 30 '25 07:09 DZakh

Open in StackBlitz

rescript

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

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

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

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

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

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

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

commit: 1487512

pkg-pr-new[bot] avatar Sep 30 '25 07:09 pkg-pr-new[bot]