A type-safe builder is a concept, rather than a language feature, so it is not strictly formalized.
A typical structure of a type-safe builder
A single builder function usually consists of 3 steps:
Create an object.
Execute lambda to initialize the object.
Add the object to structure or r...