I’ll briefly summarize the points that already got reported:
- the existing API is too far from the JS one (from
window.location.originin JS toWebapi.Dom.window->Webapi.Dom.Window.location->Webapi.Dom.Location.originin rescript) - 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.originin rescript as well), but could cause issues with more polymorphic/dynamic APIs (how would we write multiple bindings of the same JS function?). - we could improve the current bindings by making use of features from >= v11 (multiple optional arguments to replace several bindings)
- we could improve the inheritance modelling (type spreading and coercion could be a solution) that is quite a pain right now
- we could add docstrings and examples to have top notch API doc like Core has
- we could improve the editor tooling and Core to improve discoverability/DX
- we could ship rescript with @rescript/webapi directly
- or ask a question in create-rescript-app to include the relevant bindings (webapi, node, deno, bun)