Syntax Lookup

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

The @get decorator is used to bind to a property of an object.

Example

ReScriptJS Output
type window
@val external window: window = "window"
@get external getName: window => string = "name"

let name = getName(window)

References