How can I get the actual ModuleType.t?
module type MapType = {
type t
}
module Map = (Type: MapType) => {
@module("test")
external get: (string) => Type.t = "get"
@module("test")
external set: (string, Type.t) => unit = "get"
}
module StringMapType: MapType = {
type t = string
}
module StringMap = Map(StringMapType)
let a = StringMap.get("123")
// a is not string, but StringMap.t
a->Js.String2.toLowerCase