| 77 | } |
| 78 | |
| 79 | type Program struct { |
| 80 | opts ProgramOptions |
| 81 | checkerPool CheckerPool // always set; used as fallback for project system pools |
| 82 | |
| 83 | // compilerCheckerPool is set only when the built-in compiler checker pool is in use |
| 84 | // (i.e. CreateCheckerPool was not provided). It enables grouped parallel iteration, |
| 85 | // non-exclusive access for emit, and direct global diagnostics collection. |
| 86 | compilerCheckerPool *checkerPool |
| 87 | |
| 88 | comparePathsOptions tspath.ComparePathsOptions |
| 89 | |
| 90 | processedFiles |
| 91 | |
| 92 | usesUriStyleNodeCoreModules core.Tristate |
| 93 | |
| 94 | commonSourceDirectory string |
| 95 | commonSourceDirectoryOnce sync.Once |
| 96 | |
| 97 | declarationDiagnosticCache collections.SyncMap[*ast.SourceFile, []*ast.Diagnostic] |
| 98 | |
| 99 | programDiagnostics []*ast.Diagnostic |
| 100 | hasEmitBlockingDiagnostics collections.Set[tspath.Path] |
| 101 | |
| 102 | sourceFilesToEmitOnce sync.Once |
| 103 | sourceFilesToEmit []*ast.SourceFile |
| 104 | |
| 105 | // Cached unresolved imports for ATA |
| 106 | unresolvedImports lazyValue[collections.Set[string]] |
| 107 | knownSymlinks lazyValue[symlinks.KnownSymlinks] |
| 108 | |
| 109 | // Used by auto-imports |
| 110 | packageNames lazyValue[packageNamesInfo] |
| 111 | |
| 112 | // Used by workspace/symbol |
| 113 | hasTSFileOnce sync.Once |
| 114 | hasTSFile bool |
| 115 | |
| 116 | // Cached map of package names to whether they bundle types |
| 117 | packagesMapOnce sync.Once |
| 118 | packagesMap map[string]bool |
| 119 | } |
| 120 | |
| 121 | // FileExists implements checker.Program. |
| 122 | func (p *Program) FileExists(path string) bool { |
nothing calls this directly
no outgoing calls
no test coverage detected