Syntax Lookup
Enter some language construct you want to know more about.
{ key: type }
A record type is a named set of typed fields.
A record type defines a fixed structure with named fields.
Example
Nested Record Types
Since ReScript 12, record types can be declared inline inside another record type:
REStype profile = {
name: string,
settings: {
notifications: bool,
theme: string,
},
}
Nested record types are useful when the inner shape belongs only to its parent. If it needs to be referenced independently, give it a separate named type.