Syntax Lookup

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

The @new decorator is used whenever you need to bind to a JavaScript class constructor that requires the new keword for instantiation.

Example

ReScriptJS Output
type t

@new external create: unit => t = "Date"

let now = create()

References