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 @set decorator.

The @set decorator is used to set a property of an object.

Example

ReScriptJS Output
type window
@val external window: window = "window"
@set external setName: (window, string) => unit = "name"

setName(window, "MyWindow")

References

  • Bind Using Special Getter and Setter Attributes

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on