Files
GNX-mailEnterprise/frontend/node_modules/oblivious-set/dist/es/index.d.ts
Iliyan Angelov c67067a2a4 Mail
2025-09-14 23:24:25 +03:00

21 lines
566 B
TypeScript

/**
* this is a set which automatically forgets
* a given entry when a new entry is set and the ttl
* of the old one is over
*/
export declare class ObliviousSet<T = any> {
readonly ttl: number;
readonly set: Set<unknown>;
readonly timeMap: Map<any, any>;
constructor(ttl: number);
has(value: T): boolean;
add(value: T): void;
clear(): void;
}
/**
* Removes all entries from the set
* where the TTL has expired
*/
export declare function removeTooOldValues(obliviousSet: ObliviousSet): void;
export declare function now(): number;