ReScript HomeReScript Home
DocsPlaygroundBlogCommunityPackages
  • Playground
  • Blog
  • Community
  • Packages
  • X
  • Bluesky
  • GitHub
  • Forum
Language ManualAPISyntax LookupReact

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

  • Module

© 2026 The ReScript Project

About
  • Community
  • ReScript Association
Find us on