(file: string)
| 2039 | const used = usedUnitFiles(fromFile, context); |
| 2040 | // How near a helper's unit is: its own unit's nearest, then the units used last. |
| 2041 | const rank = (file: string): number => (own.includes(file) ? Infinity : used.indexOf(file)); |
| 2042 | return helpers.filter((h) => rank(h.filePath) >= 0) |
| 2043 | .sort((a, b) => rank(b.filePath) - rank(a.filePath) || b.startLine - a.startLine)[0] ?? null; |
| 2044 | } |
no outgoing calls
no test coverage detected