Syntax Lookup

Enter some language construct you want to know more about.
This is the @val decorator.

The @val decorator allows you to bind to JavaScript values that are on the global scope.

Example

ReScriptJS Output
type timeoutID

@val
external setTimeout: (unit => unit, int) => timeoutID = "setTimeout"

let timeoutID = setTimeout(() => Console.log("Hello"), 1000)

References