import type { EntityManager } from 'typeorm'; /** * Claim a board for a save only if nobody saved it since the editor read it (ADR-0098, architect ruling * 2026-09-27). True when claimed; false when it was saved in between. * * One statement does both. Reading updatedAt, comparing it and then saving would let two tabs through the * same gap; a conditional UPDATE is decided by the database under the row's lock - on postgres the second * one waits for the first to commit, re-reads the row, and finds updatedAt moved. * * Compared to the millisecond, as a window [t, t + 1ms). The editor holds a JavaScript time, which has * milliseconds; postgres stores microseconds, so equality would call every board changed. A window also * accepts rows written before this rule, whose updatedAt has microseconds. */ export declare function claimUnchangedSince(tx: EntityManager | undefined, domainId: string, boardId: string, expected: Date): Promise;