(root: string | null | undefined)
| 12 | export function getAnnotateReferenceRootPaths(options: AnnotateReferenceRootOptions): string[] { |
| 13 | const roots: string[] = []; |
| 14 | const addRoot = (root: string | null | undefined) => { |
| 15 | if (!root) return; |
| 16 | const resolved = resolveUserPath(root); |
| 17 | if (!roots.includes(resolved)) roots.push(resolved); |
| 18 | try { |
| 19 | const real = realpathSync(resolved); |
| 20 | if (!roots.includes(real)) roots.push(real); |
| 21 | } catch { |
| 22 | /* Missing source paths still contribute their lexical parent. */ |
| 23 | } |
| 24 | }; |
| 25 | |
| 26 | if (options.mode === "annotate-folder" && options.folderPath) { |
| 27 | addRoot(options.folderPath); |
no test coverage detected