Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Give your feedback about rescript-webapi!

$
0
0

I’ll briefly summarize the points that already got reported:

  1. the existing API is too far from the JS one (from window.location.origin in JS to Webapi.Dom.window->Webapi.Dom.Window.location->Webapi.Dom.Location.origin in rescript)
  2. we could change the types to base them on private spreaded records instead of abstract types, this would play well with simple and imperative APIs (this would allow to write window.location.origin in rescript as well), but could cause issues with more polymorphic/dynamic APIs (how would we write multiple bindings of the same JS function?).
  3. we could improve the current bindings by making use of features from >= v11 (multiple optional arguments to replace several bindings)
  4. we could improve the inheritance modelling (type spreading and coercion could be a solution) that is quite a pain right now
  5. we could add docstrings and examples to have top notch API doc like Core has
  6. we could improve the editor tooling and Core to improve discoverability/DX
  7. we could ship rescript with @rescript/webapi directly
  8. or ask a question in create-rescript-app to include the relevant bindings (webapi, node, deno, bun)

Viewing all articles
Browse latest Browse all 2592

Trending Articles