import { PrimitiveTypeKind, Type, PrimitiveStringTypeKind, ClassProperty, MaybeTypeIdentity, TransformedStringTypeKind } from "./Type"; import { TypeGraph, TypeRef } from "./TypeGraph"; import { TypeAttributes, TypeAttributeKind } from "./attributes/TypeAttributes"; import { StringTypes } from "./attributes/StringTypes"; export declare const provenanceTypeAttributeKind: TypeAttributeKind>; export declare type StringTypeMapping = ReadonlyMap; export declare function stringTypeMappingGet(stm: StringTypeMapping, kind: TransformedStringTypeKind): PrimitiveStringTypeKind; export declare function getNoStringTypeMapping(): StringTypeMapping; export declare class TypeBuilder { private readonly _stringTypeMapping; readonly canonicalOrder: boolean; private readonly _allPropertiesOptional; private readonly _addProvenanceAttributes; readonly typeGraph: TypeGraph; protected readonly topLevels: Map; protected readonly types: (Type | undefined)[]; private readonly typeAttributes; private _addedForwardingIntersection; constructor(typeGraphSerial: number, _stringTypeMapping: StringTypeMapping, canonicalOrder: boolean, _allPropertiesOptional: boolean, _addProvenanceAttributes: boolean, inheritsProvenanceAttributes: boolean); addTopLevel(name: string, tref: TypeRef): void; reserveTypeRef(): TypeRef; private assertTypeRefGraph; private assertTypeRefSetGraph; private filterTypeAttributes; private commitType; protected addType(forwardingRef: TypeRef | undefined, creator: (tref: TypeRef) => T, attributes: TypeAttributes | undefined): TypeRef; typeAtIndex(index: number): Type; atIndex(index: number): [Type, TypeAttributes]; addAttributes(tref: TypeRef, attributes: TypeAttributes): void; finish(): TypeGraph; protected addForwardingIntersection(forwardingRef: TypeRef, tref: TypeRef): TypeRef; protected forwardIfNecessary(forwardingRef: TypeRef | undefined, tref: undefined): undefined; protected forwardIfNecessary(forwardingRef: TypeRef | undefined, tref: TypeRef): TypeRef; protected forwardIfNecessary(forwardingRef: TypeRef | undefined, tref: TypeRef | undefined): TypeRef | undefined; readonly didAddForwardingIntersection: boolean; private readonly _typeForIdentity; private registerTypeForIdentity; protected makeIdentity(maker: () => MaybeTypeIdentity): MaybeTypeIdentity; private getOrAddType; private registerType; getPrimitiveType(kind: PrimitiveTypeKind, maybeAttributes?: TypeAttributes, forwardingRef?: TypeRef): TypeRef; getStringType(attributes: TypeAttributes, stringTypes: StringTypes | undefined, forwardingRef?: TypeRef): TypeRef; getEnumType(attributes: TypeAttributes, cases: ReadonlySet, forwardingRef?: TypeRef): TypeRef; makeClassProperty(tref: TypeRef, isOptional: boolean): ClassProperty; getUniqueObjectType(attributes: TypeAttributes, properties: ReadonlyMap | undefined, additionalProperties: TypeRef | undefined, forwardingRef?: TypeRef): TypeRef; getUniqueMapType(forwardingRef?: TypeRef): TypeRef; getMapType(attributes: TypeAttributes, values: TypeRef, forwardingRef?: TypeRef): TypeRef; setObjectProperties(ref: TypeRef, properties: ReadonlyMap, additionalProperties: TypeRef | undefined): void; getUniqueArrayType(forwardingRef?: TypeRef): TypeRef; getArrayType(attributes: TypeAttributes, items: TypeRef, forwardingRef?: TypeRef): TypeRef; setArrayItems(ref: TypeRef, items: TypeRef): void; modifyPropertiesIfNecessary(properties: ReadonlyMap): ReadonlyMap; getClassType(attributes: TypeAttributes, properties: ReadonlyMap, forwardingRef?: TypeRef): TypeRef; getUniqueClassType(attributes: TypeAttributes, isFixed: boolean, properties: ReadonlyMap | undefined, forwardingRef?: TypeRef): TypeRef; getUnionType(attributes: TypeAttributes, members: ReadonlySet, forwardingRef?: TypeRef): TypeRef; getUniqueUnionType(attributes: TypeAttributes, members: ReadonlySet | undefined, forwardingRef?: TypeRef): TypeRef; getIntersectionType(attributes: TypeAttributes, members: ReadonlySet, forwardingRef?: TypeRef): TypeRef; getUniqueIntersectionType(attributes: TypeAttributes, members: ReadonlySet | undefined, forwardingRef?: TypeRef): TypeRef; setSetOperationMembers(ref: TypeRef, members: ReadonlySet): void; setLostTypeAttributes(): void; }