The @val decorator allows you to bind to JavaScript values that are on the global scope.
@val
type timeoutID @val external setTimeout: (unit => unit, int) => timeoutID = "setTimeout" let timeoutID = setTimeout(() => Console.log("Hello"), 1000)
Bind to Global JS Values