/**
 * @file Resolve a binary path to the underlying script file. Wrapper-script
 *   unwrapping: a binary like `npm` is rarely an executable — on Windows it's
 *   `npm.cmd` / `npm.ps1` / extensionless `npm` shell script. Each wrapper
 *   variant has a fixed format generated by either the npm CLI build (npm/npx
 *   specific) or by `cmd-shim` for arbitrary package binaries. We pattern-match
 *   each format and extract the relative path to the underlying `.js` so
 *   callers can spawn Node with that path directly (cheaper than re-launching a
 *   shell wrapper). Volta managed installs: Volta layers binaries through
 *   `~/.volta/tools/{image,user}/...` with version-pinned subdirs. We detect
 *   the `.volta/` segment in the path and walk into the image directory to find
 *   the real CLI script. Caching: per-Volta-key cache + a final `realpathSync`
 *   to dedupe symlinked installations. Both caches live in `_internal.ts` so
 *   `which.ts` can flush them when its own cache eviction fires. Cycles with
 *   `which.ts`: `resolveRealBinSync` calls `whichRealSync` to handle relative
 *   input paths. ESM tolerates the cycle since both sides expose only functions
 *   (no eager top-level evaluation that needs the other module's bindings).
 */
/**
 * Resolve a binary path to the real underlying script file. Handles Windows
 * .cmd wrappers and Unix shell scripts, resolving them to the actual .js files
 * they execute.
 *
 * @example
 *   ;```typescript
 *   const realPath = resolveRealBinSync('/usr/local/bin/npm')
 *   // e.g. '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
 *   ```
 */
export declare function resolveRealBinSync(binPath: string): string;
