+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