/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict-local */ import type {ViewModel, OutlineEditor, View} from 'outline'; export const viewModelsWithoutHistory: Set = new Set(); export function updateWithoutHistory( editor: OutlineEditor, updateFn: (view: View) => void, ): boolean { const res = editor.update(updateFn); const pendingViewModel = editor._pendingViewModel; if (pendingViewModel !== null) { viewModelsWithoutHistory.add(pendingViewModel); } return res; }