import { GraphQLUnionType, GraphQLTypeResolver } from "graphql"; import { TypeResolvable, ObjectType, Removable, KeyValue, ClassType } from "../../.."; import { GQLAnyType } from "../GQLAnyType"; export declare class UnionType extends GQLAnyType implements TypeResolvable { protected _types: (ObjectType | ClassType)[]; protected _typeResolver: GraphQLTypeResolver; get types(): (ClassType | ObjectType)[]; get typeResolver(): GraphQLTypeResolver; protected constructor(name: string, ...types: (ObjectType | ClassType)[]); static create(name: string, ...types: (ObjectType | ClassType)[]): UnionType; /** * Set the union type resolver * @param typeResolver the type resolver function */ setTypeResolver(typeResolver: GraphQLTypeResolver): this; /** * Set the types of the union * @param types The types of the union */ setTypes(...types: (ObjectType | ClassType)[]): this; /** * Add some types to the union * @param types The types to add */ addTypes(...types: (ObjectType | ClassType)[]): this; /** * Remove some types to the union * @param types The types to remove */ removeTypes(...types: Removable): this; /** * Copy the UnionType */ copy(): UnionType; build(): GraphQLUnionType; defaultTypeResolver(obj: KeyValue): any; }