export declare function replaceOrAdd(items: T[], itemFactory: (existing?: T) => T | undefined, where: (item: T) => boolean): T[];