```reason exception Error(string); let handlePromiseFailure = [@bs.open] ( fun | Error(_) => () ); ``` Formats into ```rescript 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. https://rescript-lang.org/try?ext=re&code=KYDwxsAOAuCWD2A7ABAUQE7vugFAZ2nVkQHMBKAbgCgqAbYaZACwENEATegBSwFtY8wAGItYtAK7pgyALxVkyANoABAEZ4AdPEjBEAXXnIchhQDNxiE8gA+aTNhwB9MrIB8RsocpUgA 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).
Formats into
The whole
@bs.openis gone. I also have no idea how to express the code in the new rescript syntax.https://rescript-lang.org/try?ext=re&code=KYDwxsAOAuCWD2A7ABAUQE7vugFAZ2nVkQHMBKAbgCgqAbYaZACwENEATegBSwFtY8wAGItYtAK7pgyALxVkyANoABAEZ4AdPEjBEAXXnIchhQDNxiE8gA+aTNhwB9MrIB8RsocpUgA
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).