Syntax Lookup

Enter some language construct you want to know more about.
module type of extracts a module type from an existing module.

Use module type of when you want a signature based on an existing module.

Example

ReScriptJS Output
module Message = {
  let greeting = "Hello"
  let prefix = "[msg]"
}

module type MessageShape = module type of Message

module LoudMessage: MessageShape = {
  let greeting = "HELLO"
  let prefix = "[LOUD]"
}

References