@@ -4303,103 +4303,6 @@ declare namespace ts {
43034303 function createAbstractBuilder ( rootNames : ReadonlyArray < string > | undefined , options : CompilerOptions | undefined , host ?: CompilerHost , oldProgram ?: BuilderProgram , configFileParsingDiagnostics ?: ReadonlyArray < Diagnostic > ) : BuilderProgram ;
43044304}
43054305declare namespace ts {
4306- < < < << << HEAD
4307- = === ===
4308- /** This is the cache of module/typedirectives resolution that can be retained across program */
4309- interface ResolutionCache {
4310- startRecordingFilesWithChangedResolutions ( ) : void ;
4311- finishRecordingFilesWithChangedResolutions ( ) : Path [ ] | undefined ;
4312- resolveModuleNames ( moduleNames : string [ ] , containingFile : string , reusedNames : string [ ] | undefined ) : ResolvedModuleFull [ ] ;
4313- getResolvedModuleWithFailedLookupLocationsFromCache ( moduleName : string , containingFile : string ) : CachedResolvedModuleWithFailedLookupLocations | undefined ;
4314- resolveTypeReferenceDirectives ( typeDirectiveNames : string [ ] , containingFile : string ) : ResolvedTypeReferenceDirective [ ] ;
4315- invalidateResolutionOfFile ( filePath : Path ) : void ;
4316- removeResolutionsOfFile ( filePath : Path ) : void ;
4317- setFilesWithInvalidatedNonRelativeUnresolvedImports ( filesWithUnresolvedImports : Map < ReadonlyArray < string > > ) : void ;
4318- createHasInvalidatedResolution ( forceAllFilesAsInvalidated ?: boolean ) : HasInvalidatedResolution ;
4319- startCachingPerDirectoryResolution ( ) : void ;
4320- finishCachingPerDirectoryResolution ( ) : void ;
4321- updateTypeRootsWatch ( ) : void ;
4322- closeTypeRootsWatch ( ) : void ;
4323- clear ( ) : void ;
4324- }
4325- interface ResolutionWithFailedLookupLocations {
4326- readonly failedLookupLocations : ReadonlyArray < string > ;
4327- isInvalidated ?: boolean ;
4328- refCount ?: number ;
4329- }
4330- interface CachedResolvedModuleWithFailedLookupLocations extends ResolvedModuleWithFailedLookupLocations , ResolutionWithFailedLookupLocations {
4331- }
4332- interface ResolutionCacheHost extends ModuleResolutionHost {
4333- toPath ( fileName : string ) : Path ;
4334- getCanonicalFileName : GetCanonicalFileName ;
4335- getCompilationSettings ( ) : CompilerOptions ;
4336- watchDirectoryOfFailedLookupLocation ( directory : string , cb : DirectoryWatcherCallback , flags : WatchDirectoryFlags ) : FileWatcher ;
4337- onInvalidatedResolution ( ) : void ;
4338- watchTypeRootsDirectory ( directory : string , cb : DirectoryWatcherCallback , flags : WatchDirectoryFlags ) : FileWatcher ;
4339- onChangedAutomaticTypeDirectiveNames ( ) : void ;
4340- getCachedDirectoryStructureHost ( ) : CachedDirectoryStructureHost | undefined ;
4341- projectName ?: string ;
4342- getGlobalCache ?( ) : string | undefined ;
4343- writeLog ( s : string ) : void ;
4344- maxNumberOfFilesToIterateForInvalidation ?: number ;
4345- getCurrentProgram ( ) : Program ;
4346- }
4347- const maxNumberOfFilesToIterateForInvalidation = 256 ;
4348- function createResolutionCache ( resolutionHost : ResolutionCacheHost , rootDirForResolution : string | undefined , logChangesWhenResolvingModule : boolean ) : ResolutionCache ;
4349- }
4350- declare namespace ts . moduleSpecifiers {
4351- interface ModuleSpecifierPreferences {
4352- readonly importModuleSpecifierPreference ?: "relative" | "non-relative" ;
4353- readonly includeExtensionInImports ?: boolean ;
4354- }
4355- function getModuleSpecifier ( compilerOptions : CompilerOptions , importingSourceFile : SourceFile , importingSourceFileName : Path , toFileName : string , host : ModuleSpecifierResolutionHost , files : ReadonlyArray < SourceFile > , preferences ?: ModuleSpecifierPreferences ) : string ;
4356- function getModuleSpecifiers ( moduleSymbol : Symbol , compilerOptions : CompilerOptions , importingSourceFile : SourceFile , host : ModuleSpecifierResolutionHost , files : ReadonlyArray < SourceFile > , preferences : ModuleSpecifierPreferences ) : ReadonlyArray < ReadonlyArray < string > > ;
4357- }
4358- declare namespace ts {
4359- /**
4360- * Create a function that reports error by writing to the system and handles the formating of the diagnostic
4361- */
4362- function createDiagnosticReporter ( system : System , pretty ?: boolean ) : DiagnosticReporter ;
4363- /** @internal */
4364- const nonClearingMessageCodes : number [ ] ;
4365- /** @internal */
4366- const screenStartingMessageCodes : number [ ] ;
4367- /**
4368- * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic
4369- */
4370- function createWatchStatusReporter ( system : System , pretty ?: boolean ) : WatchStatusReporter ;
4371- /** Parses config file using System interface */
4372- function parseConfigFileWithSystem ( configFileName : string , optionsToExtend : CompilerOptions , system : System , reportDiagnostic : DiagnosticReporter ) : ParsedCommandLine | undefined ;
4373- /**
4374- * Program structure needed to emit the files and report diagnostics
4375- */
4376- interface ProgramToEmitFilesAndReportErrors {
4377- getCurrentDirectory ( ) : string ;
4378- getCompilerOptions ( ) : CompilerOptions ;
4379- getSourceFiles ( ) : ReadonlyArray < SourceFile > ;
4380- getSyntacticDiagnostics ( ) : ReadonlyArray < Diagnostic > ;
4381- getOptionsDiagnostics ( ) : ReadonlyArray < Diagnostic > ;
4382- getGlobalDiagnostics ( ) : ReadonlyArray < Diagnostic > ;
4383- getSemanticDiagnostics ( ) : ReadonlyArray < Diagnostic > ;
4384- getConfigFileParsingDiagnostics ( ) : ReadonlyArray < Diagnostic > ;
4385- emit ( ) : EmitResult ;
4386- }
4387- type ReportEmitErrorSummary = ( errorCount : number ) => void ;
4388- /**
4389- * Helper that emit files, report diagnostics and lists emitted and/or source files depending on compiler options
4390- */
4391- function emitFilesAndReportErrors ( program : ProgramToEmitFilesAndReportErrors , reportDiagnostic : DiagnosticReporter , writeFileName ?: ( s : string ) => void , reportSummary ?: ReportEmitErrorSummary ) : ExitStatus ;
4392- /**
4393- * Creates the watch compiler host from system for config file in watch mode
4394- */
4395- function createWatchCompilerHostOfConfigFile < T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram > ( configFileName : string , optionsToExtend : CompilerOptions | undefined , system : System , createProgram ?: CreateProgram < T > , reportDiagnostic ?: DiagnosticReporter , reportWatchStatus ?: WatchStatusReporter ) : WatchCompilerHostOfConfigFile < T > ;
4396- /**
4397- * Creates the watch compiler host from system for compiling root files and options in watch mode
4398- */
4399- function createWatchCompilerHostOfFilesAndCompilerOptions < T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram > ( rootFiles : string [ ] , options : CompilerOptions , system : System , createProgram ?: CreateProgram < T > , reportDiagnostic ?: DiagnosticReporter , reportWatchStatus ?: WatchStatusReporter ) : WatchCompilerHostOfFilesAndCompilerOptions < T > ;
4400- }
4401- declare namespace ts {
4402- > >>> >>> add support of extension preference
44034306 type WatchStatusReporter = ( diagnostic : Diagnostic , newLine : string , options : CompilerOptions ) => void ;
44044307 /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */
44054308 type CreateProgram < T extends BuilderProgram > = ( rootNames : ReadonlyArray < string > | undefined , options : CompilerOptions | undefined , host ?: CompilerHost , oldProgram ?: T , configFileParsingDiagnostics ?: ReadonlyArray < Diagnostic > ) => T ;
0 commit comments