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.
This is the open object type syntax.

Use {..} to describe object types that must contain some fields but may contain additional fields.

Example

ReScriptJS Output
type named<'a> = {.."name": string} as 'a

let getName: named<_> => string = obj => obj["name"]

let name = getName({"name": "Ada", "age": 36})

References

  • Object

© 2026 The ReScript Project

About
  • Community
  • ReScript Association
Find us on