This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
bs.open does not convert from ReasonML #185
Closed
Description
exception Error(string);
let handlePromiseFailure =
[@bs.open]
(
fun
| Error(_) => ()
);
Formats into
exception Error(string)
let handlePromiseFailure = x =>
switch x {
| Error(_) => ()
}
The whole @bs.open
is gone. I also have no idea how to express the code in the new rescript syntax.
I think this is not a legacy way of handling exceptions as it has been introduced in 0.7 (https://github.com/rescript-lang/rescript-compiler/blob/master/site/docsource/Exception-handling.adoc#bsopen-type-safe-external-data-source-handling-since-170).