import { CancellationToken } from './cancellation'; import { Disposable } from './lifecycle'; export interface CacheResult extends Disposable { promise: Promise; } export declare class Cache { private task; private result; constructor(task: (ct: CancellationToken) => Promise); get(): CacheResult; } /** * Uses a LRU cache to make a given parametrized function cached. * Caches just the last value. * The key must be JSON serializable. */ export declare class LRUCachedComputed { private readonly computeFn; private lastCache; private lastArgKey; constructor(computeFn: (arg: TArg) => TComputed); get(arg: TArg): TComputed; }