you can indeed define records that compile to arrays in rescript, that’s a nice way to replace tuples with something more ergonomic:
type t = {
@as("0") foo: int,
@as("1") bar: string
}
let t = { foo: 13, bar: "bar"}
let bar = t.bar
you can indeed define records that compile to arrays in rescript, that’s a nice way to replace tuples with something more ergonomic:
type t = {
@as("0") foo: int,
@as("1") bar: string
}
let t = { foo: 13, bar: "bar"}
let bar = t.bar