import type { CacheEntry, NarrowResponse } from "../types.js"; /** * Revalidates the given cache entry/entries. */ export declare function revalidate(key?: string | string[] | void, force?: boolean): Promise; export declare function cacheKeyOp(key: string | string[] | void, fn: (cacheEntry: CacheEntry) => void): void; export type CachedFunction any> = T extends (...args: infer A) => infer R ? ([] extends { [K in keyof A]-?: A[K]; } ? (...args: never[]) => R extends Promise ? Promise> : NarrowResponse : (...args: A) => R extends Promise ? Promise> : NarrowResponse) & { keyFor: (...args: A) => string; key: string; } : never; export declare function query any>(fn: T, name: string): CachedFunction; export declare namespace query { export var get: (key: string) => any; export var set: (key: string, value: T extends Promise ? never : T) => void; var _a: (key: string) => boolean; export var clear: () => void; export { _a as delete }; } /** @deprecated use query instead */ export declare const cache: typeof query; export declare function hashKey>(args: T): string;