import type { Persistence, ValidKey } from "./Persistence"; /** * Create a Persistence that will remove entries after they expire. * * An expiration function must be provided, which is called each time a value is stored. It must return the expiration * time for that value, given in seconds from now. For example, to expire a value 24 hours after it is stored, the * expiration function should return 86400 (the number of seconds in 24 hours). */ export declare class ExpiringPersistence implements Persistence { private readonly expiration; private readonly persistence; constructor(expiration: (value: T) => number, persistence: Persistence<[number, T]>); get size(): number; retrieve(key: ValidKey): Promise; retrieveAll(): Promise>; remove(key: ValidKey): Promise; removeAll(): Promise; removeExpired(): Promise; store(value: T): Promise; store(key: ValidKey, value: T): Promise; } //# sourceMappingURL=ExpiringPersistence.d.ts.map