/** Where this CLI is installed: `prefix` for npm, `nodeModules` for reading the version back. */ export type InstallRoot = { prefix: string; nodeModules: string; }; /** * The prefix to upgrade in place, or null when the layout is not npm's. * * Guarded on purpose: npx, pnpm and bun all nest the package under a bare `node_modules`, and * installing into their trees would report a success the PATH binary never sees. */ export declare function resolveInstallRoot(packageRoot: string, platform: typeof process.platform, onDisk?: (candidate: string) => boolean): InstallRoot | null; export declare function installRoot(): InstallRoot | null; /** This package's own dir under a prefix's node_modules. */ export declare function installedPackageDir(nodeModules: string): string; /** The version on disk under a prefix, which is the only account of what `@latest` resolved to. */ export declare function readInstalledVersion(nodeModules: string): string | null;