( files: string[], overrides?: Record<string, Language> )
| 796 | * (#1628). C++ was already covered; Objective-C was not. |
| 797 | */ |
| 798 | export function preloadLanguagesForFiles( |
| 799 | files: string[], |
| 800 | overrides?: Record<string, Language> |
| 801 | ): Language[] { |
| 802 | const languages = [...new Set(files.map((f) => detectLanguage(f, undefined, overrides)))]; |
| 803 | if (languages.includes('c')) { |
| 804 | for (const ambiguous of ['cpp', 'objc'] as const) { |
| 805 | if (!languages.includes(ambiguous)) languages.push(ambiguous); |
| 806 | } |
| 807 | } |
| 808 | return languages; |
| 809 | } |
| 810 | |
| 811 | export class ScopeIgnore { |
| 812 | private embedded: Array<{ root: string; matcher: Ignore }>; |
no test coverage detected