Where is bs.return documented?


As the title says, where is the bs.return attribute documented? I learned about bs.return while reading the source for bs-fetch where the author uses [@@bs.return null_to_opt] to interop with an external function that returns null as (logically) None. However, I can’t find bs.return on both the BuckleScript & ReasonML sites. I also do not see it on bs-blabla.


It was documented here: https://bucklescript.github.io/bucklescript/Manual.html#_return_value_checking_since_1_5_1 , but that resource seems to be removed. It is cached by WaybackMachine, so you could look at it there.

I couldn’t find any updated resources that documents bs.return.


Thanks @mikael! This is golden. FYI, this file remains present in the repo today. However, the Manual.html file is marked as deprecated.

Do we know if bs.return is deprecated as well? Or is it missing from the current documentation by error?


It is not deprecated, I will add those docs to the site