/** * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ import { runInAction } from "mobx"; export function replaceObservableObject(target: Partial>, source: Partial>): void { runInAction(() => { for (const key in target) { if (!(key in source)) { delete target[key]; } } Object.assign(target, source); }); }