( fileIndex: FileIndex, partialPath: string, )
| 687 | */ |
| 688 | const MAX_SUGGESTIONS = 15 |
| 689 | function findMatchingFiles( |
| 690 | fileIndex: FileIndex, |
| 691 | partialPath: string, |
| 692 | ): SuggestionItem[] { |
| 693 | const results = fileIndex.search(partialPath, MAX_SUGGESTIONS) |
| 694 | return results.map(result => |
| 695 | createFileSuggestionItem(result.path, result.score), |
| 696 | ) |
| 697 | } |
| 698 | |
| 699 | /** |
| 700 | * Starts a background refresh of the file index cache if not already in progress. |
no test coverage detected