import * as plugins from './classes.plugins.js'; import { Interest } from './classes.interestmap.interest.js'; export type IInterestComparisonFunc = (objectArg: T) => string; export interface IInterestMapOptions { markLostAfterDefault?: number; } export declare class InterestMap { 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, optionsArg?: IInterestMapOptions); /** * adds an interest to the InterestMap * @param interestId */ addInterest(interestId: DTInterestId, defaultFullfillmentArg?: DTInterestFullfillment): Promise>; interestObservable: plugins.smartrx.ObservableIntake>; /** * removes an interest from the interest map */ removeInterest(interestArg: Interest): 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; /** * destroys the InterestMap and cleans up all resources */ destroy(): void; }