import { IRef, Params, SubFn } from "./model"; /** * Each subscription maintains its own cache of active subscriptions based * on the params passed to it. * * TODO do we need to support a global clearSubscriptionCaches method? */ export interface ISubCache { /** * Get a cached reference of the sub for the given params, if any exists */ get(params: P): IRef | undefined; /** * Store a cached reference */ put(params: P, ref: IRef): void; /** * Delete the cached reference for the given sub */ delete(params: P): void; } export declare function createCacheFor(fn: SubFn): ISubCache;