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

Syntax Lookup

Enter some language construct you want to know more about.
This is the type keyword

The type keyword is used to declare a type, including Records, Variants and Polymorphic Variants.

Example

ReScriptJS Output
type location = {
  name: string,
  coordinates: (float, float),
  keywords: array<string>,
}

let uluru: location = {
  name: "Uluru",
  coordinates: (-25.344490, 131.035431),
  keywords: ["Rock", "Australia"],
}

References

  • ReScript Types

  • Record Types

  • Variant Types

  • Polymorphic Variant Types

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on