I'm trying to figure out why the example for using Js.Promise
uses
Js.Promise.(
...
)
Whereas the example for Json.Decode
uses
Json.Decode.{
...
}
From what I understand, .()
opens up Js.Promise
so that I can just call any function within Js.Promise
without having to prefix Js.Promise
as the module.
But what does .{}
do?