It looks like ultimate-express
uses a default export, rather than exporting everything by name. One way to fix the bindings would be to use @send
decorators on the default value.
If you put something like this in UltimateExpress.res
:
type ultimateExpressObject
@module("ultimate-express")
external ultimateExpressObject: ultimateExpressObject = "default"
...
module Router = {
type t
@send external rawMake: ultimateExpressObject => t = "Router"
let make = () => rawMake(ultimateExpressObject)
...
and then only export make in UltimateExpress.resi
:
...
module Router = {
type t
let make: unit => t
...
you’ll get the same rescript semantics while fixing the js output. (After doing likewise for the other properties, of course)