(ops: IOperation[], revision: number, resourceId: string, resourceType: ResourceType)
| 194 | } |
| 195 | |
| 196 | static ops2Changeset(ops: IOperation[], revision: number, resourceId: string, resourceType: ResourceType): ILocalChangeset { |
| 197 | const messageId = generateRandomString(); |
| 198 | if (isClient()) { |
| 199 | // register the messageId to event manager |
| 200 | new CustomEvent(messageId); |
| 201 | localStorage.setItem('doing_op_messageId', messageId); |
| 202 | } |
| 203 | return { |
| 204 | messageId, |
| 205 | baseRevision: revision, |
| 206 | resourceId, |
| 207 | resourceType, |
| 208 | operations: composeOperations(ops), |
| 209 | }; |
| 210 | } |
| 211 | |
| 212 | // Clearing the opBuffer will lose unsynchronized data |
| 213 | clearOpBuffer() { |
no test coverage detected