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

The @variadic decorator is used to model JavaScript functions that take a variable number of arguments, where all arguments are of the same type.

Example

ReScriptJS Output
@val @variadic @scope("Math")
external max: array<int> => int = "max"

let result = max([5, -2, 6, 1])

References

  • Variadic Function Arguments

© 2025 The ReScript Project

About
  • Community
  • ReScript Association
Find us on