import * as plugins from './classes.plugins.js';
import { Interest } from './classes.interestmap.interest.js';
export type IInterestComparisonFunc<T> = (objectArg: T) => string;
export interface IInterestMapOptions {
    markLostAfterDefault?: number;
}
export declare class InterestMap<DTInterestId, DTInterestFullfillment> {
    options: IInterestMapOptions;
    /**
     * stores interests that are currently fullfilled by the cache
     */
    private interestObjectMap;
    /**
     * O(1) lookup of interests by their comparison string
     */
    private interestsByComparisonString;
    /**
     * a function to compare interests
     */
    private comparisonFunc;
    constructor(comparisonFuncArg: IInterestComparisonFunc<DTInterestId>, optionsArg?: IInterestMapOptions);
    /**
     * adds an interest to the InterestMap
     * @param interestId
     */
    addInterest(interestId: DTInterestId, defaultFullfillmentArg?: DTInterestFullfillment): Promise<Interest<DTInterestId, DTInterestFullfillment>>;
    interestObservable: plugins.smartrx.ObservableIntake<Interest<DTInterestId, any>>;
    /**
     * removes an interest from the interest map
     */
    removeInterest(interestArg: Interest<DTInterestId, DTInterestFullfillment>): void;
    /**
     * check interest
     */
    checkInterest(objectArg: DTInterestId): boolean;
    /**
     * checks an interest
     * @param comparisonStringArg
     */
    checkInterestByString(comparisonStringArg: string): boolean;
    /**
     * inform lost interest
     * @param interestId
     */
    informLostInterest(interestId: DTInterestId): void;
    /**
     * finds an interest
     * @param interestId
     */
    findInterest(interestId: DTInterestId): Interest<DTInterestId, DTInterestFullfillment>;
    /**
     * destroys the InterestMap and cleans up all resources
     */
    destroy(): void;
}
