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