import { SymbolReferenceTracker } from './SymbolReferenceTracker';
import { SymbolSpec } from './SymbolSpecs';
/**
 * Name of any possible type that can be referenced.
 */
export declare abstract class TypeName {
    /**
     * Produces a string representation of the type name
     * in TypeScript syntax.
     *
     * @param trackedBy An optional symbol tracker that is notified of each symbol used
     * @return String type representation in TypeScript syntax
     */
    abstract reference(trackedBy?: SymbolReferenceTracker): string;
    toString(): string;
    union(other: TypeNameOrString): Union;
    param(...typeArgs: TypeNameOrString[]): Parameterized;
    useShortArraySyntax(): boolean;
}
export declare class Any extends TypeName {
    usage: string;
    imported?: SymbolSpec | undefined;
    constructor(usage: string, imported?: SymbolSpec | undefined);
    reference(trackedBy?: SymbolReferenceTracker): string;
}
export declare class Parameterized extends TypeName {
    name: TypeName;
    typeArgs: TypeName[];
    constructor(name: TypeName, typeArgs: TypeName[]);
    reference(trackedBy?: SymbolReferenceTracker): string;
    useShortArraySyntax(): boolean;
}
export declare enum Combiner {
    UNION = "|",
    INTERSECT = "&"
}
export declare enum BoundModifier {
    KEY_OF = "keyof"
}
export declare class Bound {
    type: TypeName;
    combiner: Combiner;
    modifier?: BoundModifier | undefined;
    constructor(type: TypeName, combiner?: Combiner, modifier?: BoundModifier | undefined);
}
export declare class TypeVariable extends TypeName {
    name: string;
    bounds: Bound[];
    constructor(name: string, bounds: Bound[]);
    reference(trackedBy?: SymbolReferenceTracker): string;
    useShortArraySyntax(): boolean;
}
export declare class Member {
    name: string;
    type: TypeName;
    optional: boolean;
    constructor(name: string, type: TypeName, optional?: boolean);
}
export declare class Anonymous extends TypeName {
    members: Member[];
    constructor(members: Member[]);
    reference(trackedBy?: SymbolReferenceTracker): string;
}
export declare class Tuple extends TypeName {
    memberTypes: TypeName[];
    constructor(memberTypes: TypeName[]);
    reference(trackedBy?: SymbolReferenceTracker): string;
    useShortArraySyntax(): boolean;
}
export declare class Intersection extends TypeName {
    typeRequirements: TypeName[];
    constructor(typeRequirements: TypeName[]);
    reference(trackedBy?: SymbolReferenceTracker): string;
    useShortArraySyntax(): boolean;
}
export declare class Union extends TypeName {
    typeChoices: TypeName[];
    constructor(typeChoices: TypeName[]);
    reference(trackedBy?: SymbolReferenceTracker): string;
    useShortArraySyntax(): boolean;
}
export declare class Lambda extends TypeName {
    parameters: Map<string, TypeName>;
    returnType: TypeName;
    constructor(parameters?: Map<string, TypeName>, returnType?: TypeName);
    reference(trackedBy?: SymbolReferenceTracker): string;
    useShortArraySyntax(): boolean;
}
/** Accept an existing TypeName or a string that could be a type literal or an import spec. */
export declare type TypeNameOrString = TypeName | string;
/** Provides public factory methods for all of the type name variants. */
export declare class TypeNames {
    static readonly NULL: Any;
    static readonly UNDEFINED: Any;
    static readonly NEVER: Any;
    static readonly VOID: Any;
    static readonly ANY: Any;
    static readonly BOOLEAN: Any;
    static readonly NUMBER: Any;
    static readonly STRING: Any;
    static readonly OBJECT: Any;
    static readonly DATE: Any;
    static readonly ARRAY: Any;
    static readonly SET: Any;
    static readonly MAP: Any;
    static readonly PROMISE: Any;
    static readonly BUFFER: Any;
    static readonly ARRAY_BUFFER: Any;
    /**
     * An imported type name
     *
     * @param spec Import spec for type name
     */
    static importedType(spec: string): Any;
    /**
     * Any class/enum/primitive/etc type name
     *
     * @param name Name for the type, will be symbolized
     */
    static anyType(name: string, imported?: SymbolSpec): Any;
    /**
     * A literal type value, e.g. 'one' or 1.
     */
    static typeLiteral(value: string | number | boolean): Any;
    static anyTypeMaybeString(type: TypeNameOrString): TypeName;
    static typesOrStrings(types: TypeNameOrString[]): TypeName[];
    /**
     * Type name for the generic Array type
     *
     * @param elementType Element type of the array
     * @return Type name of the new array type
     */
    static arrayType(elementType: TypeNameOrString): TypeName;
    /**
     * Type name for the generic Set type
     *
     * @param elementType Element type of the set
     * @return Type name of the new set type
     */
    static setType(elementType: TypeNameOrString): TypeName;
    /**
     * Type name for the generic Map type
     *
     * @param keyType Key type of the map
     * @param valueType Value type of the map
     * @return Type name of the new map type
     */
    static mapType(keyType: TypeNameOrString, valueType: TypeNameOrString): TypeName;
    /**
     * Parameterized type that represents a concrete
     * usage of a generic type
     *
     * @param rawType Generic type to invoke with arguments
     * @param typeArgs Names of the provided type arguments
     * @return Type name of the new parameterized type
     */
    static parameterizedType(rawType: TypeName, ...typeArgs: TypeNameOrString[]): Parameterized;
    /**
     * Type variable represents a single variable type in a
     * generic type or function.
     *
     * @param name The name of the variable as it will be used in the definition
     * @param bounds Bound constraints that will be required during instantiation
     * @return Type name of the new type variable
     */
    static typeVariable(name: string, ...bounds: Bound[]): TypeVariable;
    /**
     * Factory for type variable bounds
     */
    static bound(type: TypeNameOrString, combiner?: Combiner, modifier?: BoundModifier): Bound;
    /**
     * Factory for type variable bounds
     */
    static unionBound(type: TypeNameOrString, keyOf?: boolean): Bound;
    /**
     * Factory for type variable bounds
     */
    static intersectBound(type: TypeNameOrString, keyOf?: boolean): Bound;
    /**
     * Anonymous type name (e.g. `{ length: number, name: string }`)
     *
     * @param members Member pairs to define the anonymous type
     * @return Type name representing the anonymous type
     */
    static anonymousType(...members: Array<Member | [string, TypeName]>): Anonymous;
    /**
     * Tuple type name (e.g. `[number, boolean, string]`}
     *
     * @param memberTypes Each argument represents a distinct member type
     * @return Type name representing the tuple type
     */
    static tupleType(...memberTypes: TypeName[]): Tuple;
    /**
     * Intersection type name (e.g. `Person & Serializable & Loggable`)
     *
     * @param typeRequirements Requirements of the intersection as individual type names
     * @return Type name representing the intersection type
     */
    static intersectionType(...typeRequirements: TypeName[]): Intersection;
    /**
     * Union type name (e.g. `int | number | any`)
     *
     * @param typeChoices All possible choices allowed in the union
     * @return Type name representing the union type
     */
    static unionType(...typeChoices: TypeNameOrString[]): Union;
    /** Returns a lambda type with `returnType` and parameters of listed in `parameters`. */
    static lambda(parameters: Map<string, TypeName> | undefined, returnType: TypeName): Lambda;
    /** Returns a lambda type with `returnType` and parameters of listed in `parameters`. */
    static lambda2(parameters: [string, TypeName][] | undefined, returnType: TypeName): Lambda;
}
