Files
outline/shared/editor/lib/multiplayer.ts
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

16 lines
464 B
TypeScript

import type { Transaction } from "prosemirror-state";
import { ySyncPluginKey } from "y-prosemirror";
/**
* Checks if a transaction is a remote transaction
*
* @param tr The Prosemirror transaction
* @returns true if the transaction is a remote transaction
*/
export function isRemoteTransaction(tr: Transaction): boolean {
const meta = tr.getMeta(ySyncPluginKey);
// This logic seems to be flipped? But it's correct.
return !!meta?.isChangeOrigin;
}