import { TypeBuilder } from './TypeBuilder'; import { Writer } from './Writer'; export declare class UnionType extends TypeBuilder { needsParenthesisWhenIndexed: boolean; needsParenthesisInKeyof: boolean; needsParenthesisInIntersection: boolean; readonly variants: VariantType[]; constructor(firstType: VariantType); addVariant(variant: VariantType): this; addVariants(variants: VariantType[]): this; write(writer: Writer): void; mapVariants(callback: (type: VariantType) => NewVariantType): UnionType; } export declare function unionType(types: VariantType[] | VariantType): UnionType;