( fileIndex: FileIndex, partialPath: string, )
| 616 | */ |
| 617 | const MAX_SUGGESTIONS = 15 |
| 618 | function findMatchingFiles( |
| 619 | fileIndex: FileIndex, |
| 620 | partialPath: string, |
| 621 | ): SuggestionItem[] { |
| 622 | const results = fileIndex.search(partialPath, MAX_SUGGESTIONS) |
| 623 | return results.map(result => |
| 624 | createFileSuggestionItem(result.path, result.score), |
| 625 | ) |
| 626 | } |
| 627 | |
| 628 | /** |
| 629 | * Starts a background refresh of the file index cache if not already in progress. |
no test coverage detected