import { PackageJson } from 'type-fest'; export declare function readPackageJson(dir: string): null | PackageJson; export declare function stripExtension(somePath: string): string; export declare function absolutify(rootDir: string, somePath: string): string; export declare function assertPathExists(somePath: string, customMessage?: string): void; export declare function assertDirExists(somePath: string, customMessage?: string): void; export declare function assertFileExists(somePath: string, customMessage?: string): void; export declare function assertPathAbsolute(somePath: string, customMessage?: string): void; export declare function downloadPackageTarball(tarballUrl: string, toFilePath: string): Promise; export declare function getPackageVersionTarballUrl(packageName: string, packageVersion?: string): Promise; export declare function downloadPackage({ name, version, downloadDir, }: { version?: string; name: string; downloadDir: string; }): Promise; export declare function getPackageMain(packageJson: PackageJson): string; export declare function JsFilePathToTsDeclarationFilePath(jsFilePath: string): string; /** * Turn the file path into a module path. The difference from a file path * is that a module path does not have a file extension and is always in posix format. * * If the file path is already actually a module path then this is effectively a no-op. */ export declare function pathToModulePath(filePath: string): string; //# sourceMappingURL=package-helpers.d.ts.map