export namespace Cacache { export interface GetOptions { integrity?: string | undefined size?: number | undefined memoize?: boolean | undefined } export interface PutOptions { integrity?: string | undefined size?: number | undefined metadata?: any | undefined memoize?: boolean | undefined } export interface CacheEntry { data: Buffer integrity: string key: string metadata?: any | undefined path: string size: number time: number } export interface LsEntry { key: string integrity: string path: string time: number size: number metadata?: any | undefined } } export interface CacacheInstance { get: { ( cache: string, key: string, options?: Cacache.GetOptions, ): Promise sync: ( cache: string, key: string, options?: Cacache.GetOptions, ) => Cacache.CacheEntry } put: { ( cache: string, key: string, data: string | Buffer, options?: Cacache.PutOptions, ): Promise<{ integrity: string; size: number }> sync: ( cache: string, key: string, data: string | Buffer, options?: Cacache.PutOptions, ) => { integrity: string; size: number } } rm: { entry: { (cache: string, key: string): Promise sync: (cache: string, key: string) => void } all: { (cache: string): Promise sync: (cache: string) => void } } ls: { (cache: string): Promise> stream: (cache: string) => AsyncIterable } tmp: { withTmp: ( cache: string, opts: any, callback: (tmpDirPath: string) => Promise, ) => Promise } [key: string]: any } declare const cacache: CacacheInstance export default cacache