/** * Maintain weak references to instances and invoke callbacks on live ones. */ export declare class WeakInvoker { private readonly _refs; add(instance: T): void; remove(instance: T): void; invoke(callback: (instance: T) => R): R[]; cleanup(): void; get size(): number; }