import { BuilderProgram, CancellationToken, CompilerHost, CompilerOptions, CreateProgram, CustomTransformers, Diagnostic, DiagnosticMessage, DiagnosticMessageChain, DiagnosticReporter, DirectoryStructureHost, EmitAndSemanticDiagnosticsBuilderProgram, EmitResult, ExitStatus, ExtendedConfigCacheEntry, FileExtensionInfo, FileIncludeReason, FileWatcher, HasCurrentDirectory, ParsedCommandLine, Program, ProgramHost, ProjectReference, ReportEmitErrorSummary, ReportFileInError, SortedReadonlyArray, SourceFile, System, WatchCompilerHostOfConfigFile, WatchCompilerHostOfFilesAndCompilerOptions, WatchFactory, WatchFactoryHost, WatchHost, WatchOptions, WatchStatusReporter, WriteFileCallback } from "./_namespaces/ts.js"; /** * Create a function that reports error by writing to the system and handles the formatting of the diagnostic * * @internal */ export declare function createDiagnosticReporter(system: System, pretty?: boolean): DiagnosticReporter; /** * Get locale specific time based on whether we are in test mode * * @internal */ export declare function getLocaleTimeString(system: System): string; /** * Create a function that reports watch status by writing to the system and handles the formatting of the diagnostic * * @internal */ export declare function createWatchStatusReporter(system: System, pretty?: boolean): WatchStatusReporter; /** * Parses config file using System interface * * @internal */ export declare function parseConfigFileWithSystem(configFileName: string, optionsToExtend: CompilerOptions, extendedConfigCache: Map | undefined, watchOptionsToExtend: WatchOptions | undefined, system: System, reportDiagnostic: DiagnosticReporter): ParsedCommandLine | undefined; /** @internal */ export declare function getErrorCountForSummary(diagnostics: readonly Diagnostic[]): number; /** @internal */ export declare function getFilesInErrorForSummary(diagnostics: readonly Diagnostic[]): (ReportFileInError | undefined)[]; /** @internal */ export declare function getWatchErrorSummaryDiagnosticMessage(errorCount: number): DiagnosticMessage; /** @internal */ export declare function getErrorSummaryText(errorCount: number, filesInError: readonly (ReportFileInError | undefined)[], newLine: string, host: HasCurrentDirectory): string; /** @internal */ export declare function isBuilderProgram(program: Program | BuilderProgram): program is T; /** @internal */ export declare function explainFiles(program: Program, write: (s: string) => void): void; /** @internal */ export declare function explainIfFileIsRedirectAndImpliedFormat(file: SourceFile, options: CompilerOptions, fileNameConvertor?: (fileName: string) => string): DiagnosticMessageChain[] | undefined; /** @internal */ export declare function getMatchedFileSpec(program: Program, fileName: string): string | undefined; /** @internal */ export declare function getMatchedIncludeSpec(program: Program, fileName: string): string | true | undefined; /** @internal */ export declare function fileIncludeReasonToDiagnostics(program: Program, reason: FileIncludeReason, fileNameConvertor?: (fileName: string) => string): DiagnosticMessageChain; /** * Helper that emit files, report diagnostics and lists emitted and/or source files depending on compiler options * * @internal */ export declare function emitFilesAndReportErrors(program: Program | T, reportDiagnostic: DiagnosticReporter, write?: (s: string) => void, reportSummary?: ReportEmitErrorSummary, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): { emitResult: EmitResult; diagnostics: SortedReadonlyArray; }; /** @internal */ export declare function emitFilesAndReportErrorsAndGetExitStatus(program: Program | T, reportDiagnostic: DiagnosticReporter, write?: (s: string) => void, reportSummary?: ReportEmitErrorSummary, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): ExitStatus; /** @internal */ export declare const noopFileWatcher: FileWatcher; /** @internal */ export declare const returnNoopFileWatcher: () => FileWatcher; /** @internal */ export declare function createWatchHost(system?: System, reportWatchStatus?: WatchStatusReporter): WatchHost; /** @internal */ export type WatchType = WatchTypeRegistry[keyof WatchTypeRegistry]; /** @internal */ export declare const WatchType: WatchTypeRegistry; /** @internal */ export interface WatchTypeRegistry { ConfigFile: "Config file"; ExtendedConfigFile: "Extended config file"; SourceFile: "Source file"; MissingFile: "Missing file"; WildcardDirectory: "Wild card directory"; FailedLookupLocations: "Failed Lookup Locations"; AffectingFileLocation: "File location affecting resolution"; TypeRoots: "Type roots"; ConfigFileOfReferencedProject: "Config file of referened project"; ExtendedConfigOfReferencedProject: "Extended config file of referenced project"; WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project"; PackageJson: "package.json file"; ClosedScriptInfo: "Closed Script info"; ConfigFileForInferredRoot: "Config file for the inferred project root"; NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache"; MissingSourceMapFile: "Missing source map file"; NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root"; MissingGeneratedFile: "Missing generated file"; NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation"; TypingInstallerLocationFile: "File location for typing installer"; TypingInstallerLocationDirectory: "Directory location for typing installer"; } /** @internal */ export interface WatchFactoryWithLog extends WatchFactory { writeLog: (s: string) => void; } /** @internal */ export declare function createWatchFactory(host: WatchFactoryHost & { trace?(s: string): void; }, options: { extendedDiagnostics?: boolean; diagnostics?: boolean; }): WatchFactoryWithLog; /** @internal */ export declare function createCompilerHostFromProgramHost(host: ProgramHost, getCompilerOptions: () => CompilerOptions, directoryStructureHost?: DirectoryStructureHost): CompilerHost; /** @internal */ export declare function getSourceFileVersionAsHashFromText(host: Pick, text: string): string; /** @internal */ export declare function setGetSourceFileAsHashVersioned(compilerHost: CompilerHost): void; /** * Creates the watch compiler host that can be extended with config file or root file names and options host * * @internal */ export declare function createProgramHost(system: System, createProgram: CreateProgram | undefined): ProgramHost; /** @internal */ export interface CreateWatchCompilerHostInput { system: System; createProgram?: CreateProgram; reportDiagnostic?: DiagnosticReporter; reportWatchStatus?: WatchStatusReporter; } /** @internal */ export interface CreateWatchCompilerHostOfConfigFileInput extends CreateWatchCompilerHostInput { configFileName: string; optionsToExtend?: CompilerOptions; watchOptionsToExtend?: WatchOptions; extraFileExtensions?: readonly FileExtensionInfo[]; } /** * Creates the watch compiler host from system for config file in watch mode * * @internal */ export declare function createWatchCompilerHostOfConfigFile({ configFileName, optionsToExtend, watchOptionsToExtend, extraFileExtensions, system, createProgram, reportDiagnostic, reportWatchStatus, }: CreateWatchCompilerHostOfConfigFileInput): WatchCompilerHostOfConfigFile; /** @internal */ export interface CreateWatchCompilerHostOfFilesAndCompilerOptionsInput extends CreateWatchCompilerHostInput { rootFiles: string[]; options: CompilerOptions; watchOptions: WatchOptions | undefined; projectReferences?: readonly ProjectReference[]; } /** * Creates the watch compiler host from system for compiling root files and options in watch mode * * @internal */ export declare function createWatchCompilerHostOfFilesAndCompilerOptions({ rootFiles, options, watchOptions, projectReferences, system, createProgram, reportDiagnostic, reportWatchStatus, }: CreateWatchCompilerHostOfFilesAndCompilerOptionsInput): WatchCompilerHostOfFilesAndCompilerOptions; /** @internal */ export interface IncrementalCompilationOptions { rootNames: readonly string[]; options: CompilerOptions; configFileParsingDiagnostics?: readonly Diagnostic[]; projectReferences?: readonly ProjectReference[]; host?: CompilerHost; reportDiagnostic?: DiagnosticReporter; reportErrorSummary?: ReportEmitErrorSummary; afterProgramEmitAndDiagnostics?(program: EmitAndSemanticDiagnosticsBuilderProgram): void; system?: System; } /** @internal */ export declare function performIncrementalCompilation(input: IncrementalCompilationOptions): ExitStatus; //# sourceMappingURL=watch.d.ts.map