id | keywords | name | summary | category | ||
---|---|---|---|---|---|---|
get-decorator |
|
@get |
This is the `@get` decorator. |
decorators |
The @get
decorator is used to bind to a property of an object.
<CodeTab labels={["ReScript", "JS Output"]}>
type window
@bs.val external window: window = "window"
@bs.get external getName: window => string = "name"
let name = getName(window)
var name = window.name;