reasonml / reason

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
http://reasonml.github.io
MIT License
10.12k stars 428 forks source link

Confusing documentation for JavaScript Interop #2583

Closed louy2 closed 1 year ago

louy2 commented 4 years ago

In page Interop · Reason, under section Settling down and getting disciplined about things, the code shows:

[@bs.send] external getContext : (canvas, string) => context = "getContext";

But the documentation below says:

Then we made a getContext function, but instead of @bs.val we used @bs.send, and we used an empty string for the text of the external. [emphasis mine]

davesnx commented 1 year ago

This isn't part of reason anymore