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

RFC: Nested record definitions

$
0
0

At this point, what benefit is coming out other than just defining the types?

type fileConfig = {
      extension?: string
    }

type persist = {
    fileName: string,
    path?: string,
    fileConfig?: 
  }

type options = {
  startFrom: float,
  persist?: persist
}

One of the things that draws me to using rescript at work is how straight forward the type system is even if it requires a little extra typing sometimes. I’ve seen some TS codebases that are a nightmare to understand due to getting creative with types


Viewing all articles
Browse latest Browse all 2592

Trending Articles