Just remove the FunctorType
type annotation on MyMod
module MyMod = {
type a = string // this is where I want to set the type
let injectedRun = (x: a) => Console.log(x)
}
Modules are structurally typed. Using a module type annotation can therefore only remove information. You do not need to (and cannot) specify that MyMod
implements or conforms with FunctorType
.