import type { Module, RecordKey, RecordLocation, ResolvedType } from "soiac"; import { ClassName } from "./class_speller.js"; import { TsType } from "./ts_type.js"; export type TypeFlavor = "initializer" | "frozen" | "maybe-mutable" | "mutable"; /** * Transforms a type found in a `.soia` file into a TypeScript type. * * The flavors are: * · initializer * The value can be passed by parameter to the `create` method of a frozen * class or the constructor of a mutable class. * · frozen: * The type is deeply immutable. All the fields of a frozen class are also * frozen. * · maybe-mutable: * Type union of the frozen type and the mutable type. All the fields of a * mutable class are maybe-mutable. * · mutable: * A mutable value. Not all types found in `.soia` files support this, e.g. * strings and numbers are always immutable. */ export declare class TypeSpeller { readonly recordMap: ReadonlyMap; private readonly origin; constructor(recordMap: ReadonlyMap, origin: Module); getTsType(type: ResolvedType, flavor: "initializer" | "frozen" | "mutable", allRecordsFrozen?: undefined): TsType; getTsType(type: ResolvedType, flavor: TypeFlavor, allRecordsFrozen: boolean | undefined): TsType; getClassName(recordKey: RecordKey): ClassName; } export declare const TYPE_FLAVORS: ReadonlySet; //# sourceMappingURL=type_speller.d.ts.map