import { GQLField, InputField, Field, Removable, ClassType, InstanceOf, ConversionType } from "../../.."; import { GQLBasicType } from "./GQLBasicType"; export declare abstract class GQLType = any, ExtensionsType = any> extends GQLBasicType { protected _fields: GQLField[]; protected _classType?: T; get fields(): GQLField[]; /** * Convert your type into a new one * @param to The target type */ abstract convert(to: Target): InstanceOf; /** * Apply a transformation to your fields * @param cb The callback with the field instance as the first parameter */ abstract transformFields(cb: (field: InputField | Field) => void): this; /** * Set the field list * @param fields The fields list */ setFields(...fields: GQLField[]): GQLType; /** * Add some fields to the fields list * @param fields The fields list */ addFields(...fields: GQLField[]): GQLType; /** * Remove some fields from the fields list * @param fields The fields IDs */ removeFields(...fields: Removable): GQLType; /** * Make all the fields nullable */ partial(): this; /** * Make all the fields not nullable */ required(): this; }