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

RFC: Nested record definitions

$
0
0

I think having the option is nice. imo this is easier to read through, as long as the inner types aren’t reused anywhere else.

type options = {
  startFrom: float,
  persist?: {
    fileName: string,
    path?: string,
    fileConfig?:  {
      extension?: string
    }
  }
}

and it seems as though the team is not encouraging reusing types that are defined this way. It should be encouraged that if a type is reused, break it out


Viewing all articles
Browse latest Browse all 2592

Trending Articles