import { CancellationToken, CompilerOptions, CustomTransformers, EmitOutput, HostForComputeHash, Path, Program, ResolutionMode, SourceFile } from "./_namespaces/ts.js"; /** @internal */ export declare function getFileEmitOutput(program: Program, sourceFile: SourceFile, emitOnlyDtsFiles: boolean, cancellationToken?: CancellationToken, customTransformers?: CustomTransformers, forceDtsEmit?: boolean): EmitOutput; /** @internal */ export declare enum SignatureInfo { ComputedDts = 0, StoredSignatureAtEmit = 1, UsedVersion = 2 } /** @internal */ export interface BuilderState { /** * Information of the file eg. its version, signature etc */ fileInfos: Map; /** * Contains the map of ReferencedSet=Referenced files of the file if module emit is enabled * Otherwise undefined * Thus non undefined value indicates, module emit */ readonly referencedMap?: BuilderState.ReadonlyManyToManyPathMap | undefined; /** * true if file version is used as signature * This helps in delaying the calculation of the d.ts hash as version for the file till reasonable time */ useFileVersionAsSignature?: boolean; /** * Map of files that have already called update signature. * That means hence forth these files are assumed to have * no change in their signature for this version of the program */ hasCalledUpdateShapeSignature?: Set; /** * Stores signatures before before the update till affected file is committed */ oldSignatures?: Map; /** * Cache of all files excluding default library file for the current program */ allFilesExcludingDefaultLibraryFile?: readonly SourceFile[]; /** * Cache of all the file names */ allFileNames?: readonly string[]; /** Information about the signature computation - test only */ signatureInfo?: Map; } /** @internal */ export declare namespace BuilderState { /** * Information about the source file: Its version and optional signature from last emit */ interface FileInfo { readonly version: string; signature: string | undefined; affectsGlobalScope: true | undefined; impliedFormat: ResolutionMode; } interface ReadonlyManyToManyPathMap { getKeys(v: Path): ReadonlySet | undefined; getValues(k: Path): ReadonlySet | undefined; keys(): IterableIterator; size(): number; } interface ManyToManyPathMap extends ReadonlyManyToManyPathMap { deleteKey(k: Path): boolean; set(k: Path, v: ReadonlySet): void; } function createManyToManyPathMap(): ManyToManyPathMap; /** * Returns true if oldState is reusable, that is the emitKind = module/non module has not changed */ function canReuseOldState(newReferencedMap: ReadonlyManyToManyPathMap | undefined, oldState: BuilderState | undefined): boolean | undefined; function createReferencedMap(options: CompilerOptions): ManyToManyPathMap | undefined; /** * Creates the state of file references and signature for the new program from oldState if it is safe */ function create(newProgram: Program, oldState: Readonly | undefined, disableUseFileVersionAsSignature: boolean): BuilderState; /** * Releases needed properties */ function releaseCache(state: BuilderState): void; /** * Gets the files affected by the path from the program */ function getFilesAffectedBy(state: BuilderState, programOfThisState: Program, path: Path, cancellationToken: CancellationToken | undefined, host: HostForComputeHash): readonly SourceFile[]; function getFilesAffectedByWithOldState(state: BuilderState, programOfThisState: Program, path: Path, cancellationToken: CancellationToken | undefined, host: HostForComputeHash): readonly SourceFile[]; function updateSignatureOfFile(state: BuilderState, signature: string | undefined, path: Path): void; function computeDtsSignature(programOfThisState: Program, sourceFile: SourceFile, cancellationToken: CancellationToken | undefined, host: HostForComputeHash, onNewSignature: (signature: string, sourceFiles: readonly SourceFile[]) => void): void; /** * Returns if the shape of the signature has changed since last emit */ function updateShapeSignature(state: BuilderState, programOfThisState: Program, sourceFile: SourceFile, cancellationToken: CancellationToken | undefined, host: HostForComputeHash, useFileVersionAsSignature?: boolean | undefined): boolean; /** * Get all the dependencies of the sourceFile */ function getAllDependencies(state: BuilderState, programOfThisState: Program, sourceFile: SourceFile): readonly string[]; /** * Gets the files referenced by the the file path */ function getReferencedByPaths(state: Readonly, referencedFilePath: Path): Path[]; /** * Gets all files of the program excluding the default library file */ function getAllFilesExcludingDefaultLibraryFile(state: BuilderState, programOfThisState: Program, firstSourceFile: SourceFile | undefined): readonly SourceFile[]; } //# sourceMappingURL=builderState.d.ts.map