Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1991

RFC: Nested record definitions

$
0
0

+1 I have already wanted this more than once.

In your options example, would you be able to create or reference any of the nested types by themselves, or would they always need to be a part of option?

type options = {
  persist?: {
    fileName: string
  }
}

let persist = {
  fileName: "foo"
}

let persist = opt => opt.fileName

Viewing all articles
Browse latest Browse all 1991