import type { Callback, CallbackParam, RequireOptional } from '../types/global';
type Caller = {
    context?: unknown;
} | undefined;
export type CallbackParamRules<P> = RequireOptional<Omit<P, 'context'>>;
export declare function callWithContext<F extends Callback>(callers: Caller | Caller[], fn: F, params: CallbackParam<F>): ReturnType<F>;
export declare class CallbackCache {
    private cache;
    call<F extends Callback>(callers: Caller | Caller[], fn: F, params: CallbackParam<F>): ReturnType<F> | undefined;
    private invoke;
    invalidateCache(): void;
}
export {};
