()
| 1565 | } |
| 1566 | |
| 1567 | func (p *Program) CommonSourceDirectory() string { |
| 1568 | p.commonSourceDirectoryOnce.Do(func() { |
| 1569 | files := func() []string { |
| 1570 | return core.MapFiltered(p.files, func(file *ast.SourceFile) (string, bool) { |
| 1571 | return file.FileName(), sourceFileMayBeEmitted(file, p, false /*forceDtsEmit*/) && !file.IsDeclarationFile |
| 1572 | }) |
| 1573 | } |
| 1574 | p.commonSourceDirectory = outputpaths.GetCommonSourceDirectory( |
| 1575 | p.Options(), |
| 1576 | files, |
| 1577 | p.GetCurrentDirectory(), |
| 1578 | p.UseCaseSensitiveFileNames(), |
| 1579 | p.checkSourceFilesBelongToPath, |
| 1580 | ) |
| 1581 | }) |
| 1582 | return p.commonSourceDirectory |
| 1583 | } |
| 1584 | |
| 1585 | func (p *Program) checkSourceFilesBelongToPath(sourceFiles []string, rootDirectory string) bool { |
| 1586 | allFilesBelongToPath := true |
no test coverage detected