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.
Optional record fields can be omitted when creating records.

Use ? on a record field to mark it optional.

Example

ReScriptJS Output
type user = {
  age: int,
  name?: string,
}

let withName: user = {age: 5, name: "Ada"}
let withoutName: user = {age: 7}

References

  • Optional Record Fields

© 2026 The ReScript Project

About
  • Community
  • ReScript Association
Find us on