MCPcopy Create free account
hub / github.com/microsoft/typescript-go / addRootTask

Method addRootTask

internal/compiler/fileloader.go:191–200  ·  view source on GitHub ↗
(fileName string, libFile *LibFile, includeReason *FileIncludeReason)

Source from the content-addressed store, hash-verified

189}
190
191func (p *fileLoader) addRootTask(fileName string, libFile *LibFile, includeReason *FileIncludeReason) {
192 absPath := tspath.GetNormalizedAbsolutePath(fileName, p.opts.Host.GetCurrentDirectory())
193 if p.opts.Config.CompilerOptions().AllowNonTsExtensions.IsTrue() || tspath.HasExtension(absPath) {
194 p.rootTasks = append(p.rootTasks, &parseTask{
195 normalizedFilePath: absPath,
196 libFile: libFile,
197 includeReason: includeReason,
198 })
199 }
200}
201
202func (p *fileLoader) addRootFileTask(fileName string, libFile *LibFile, includeReason *FileIncludeReason) {
203 currDir := p.opts.Host.GetCurrentDirectory()

Callers 1

processAllProgramFilesFunction · 0.95

Calls 6

HasExtensionFunction · 0.92
IsTrueMethod · 0.80
GetCurrentDirectoryMethod · 0.65
CompilerOptionsMethod · 0.65
appendFunction · 0.50

Tested by

no test coverage detected