export interface PackageJson { name: string; version: string; [key: string]: any; } /** * Gets the package.json for the current package by searching up from the given directory. * This is useful for CLIs to get their own package information. * * @example * ```typescript * const pkg = getPackageJson(__dirname); * console.log(`${pkg.name}@${pkg.version}`); * ``` */ export declare const getPackageJson: (dirname: string) => PackageJson; /** * Gets the version from the package.json for the current package. * Shorthand for `getPackageJson(dirname).version`. * * @example * ```typescript * if (argv.version) { * console.log(getPackageVersion(__dirname)); * process.exit(0); * } * ``` */ export declare const getPackageVersion: (dirname: string) => string; /** * Gets the name from the package.json for the current package. * Shorthand for `getPackageJson(dirname).name`. * * @example * ```typescript * const toolName = getPackageName(__dirname); * console.log(`Welcome to ${toolName}!`); * ``` */ export declare const getPackageName: (dirname: string) => string;