( input: string, exists: (candidate: string) => boolean, )
| 42 | * predicates. The helper itself is filesystem-agnostic. |
| 43 | */ |
| 44 | export function resolveAtReference( |
| 45 | input: string, |
| 46 | exists: (candidate: string) => boolean, |
| 47 | ): string | null { |
| 48 | const stripped = stripAtPrefix(input); |
| 49 | if (exists(stripped)) return stripped; |
| 50 | if (stripped !== input && exists(input)) return input; |
| 51 | return null; |
| 52 | } |
no test coverage detected