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

The @warning decorator is used to modify the enabled compiler warnings for types, values and submodules. See here for all available warning numbers. Prefix the warning number with + or - to enable or disable respectively.

Examples

ReScriptJS Output
// Disables warning 27 for the deepClone function
@warning("-27")
let deepClone = (obj: 'a): 'a => %raw(`
  JSON.parse(JSON.stringify(obj))
`);

References

  • Warning Numbers

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on