reasonml / reasonml.github.io

Reason's documentation site
https://reasonml.github.io
MIT License
334 stars 400 forks source link

API documentation seems to incorrectly state that all listed apis are usable from JS #264

Open brentvatne opened 6 years ago

brentvatne commented 6 years ago

https://reasonml.github.io/api/index.html says:

If you're targeting JavaScript, the API docs for BuckleScript includes all of below, plus JS-specific APIs.

However, there are some APIs in the list that do not work on a project created with bsb -init some-project -theme reason-basic. It seems like perhaps everything after Weak in the list is not available. Str is one that many people will reach for and be confused about (I am guilty).

sorawee commented 6 years ago

It no longer says that, but now it doesn't say anything at all, which is equally bad. I needed to use bignum and found the library Num, so I gave a shot. Found that Num.Int(1) works, but Num.(Int(1) +/ Int(2)) doesn't, and wasted several minutes trying to find what went wrong... It would be great if there's a section in https://reasonml.github.io/api/index.html explicitly saying that "The following libraries are not supported when JavaScript is targeted".