[Typescript] UnionBuilder
interface UnionBuilder<T = never> {
add: <NewValue>() => UnionBuilder<T | NewValue>,
fold: () => T
}
declare const u: UnionBuilder;
const result = u
.add<string>()
.add<number>()
.add<boolean>()
.fold() // string | number | boolean