Standardise types for ranges (#16927)

GitOrigin-RevId: 28dd0eb67e1684e6bd0e452d15315ce1f9e3481a
This commit is contained in:
Alf Eaton
2024-02-09 09:06:51 +00:00
committed by Copybot
parent c997d1dc2b
commit 7b3ffb9fae
13 changed files with 171 additions and 185 deletions
+1 -4
View File
@@ -1,5 +1,4 @@
import {
ChangeOperation,
CommentOperation,
DeleteOperation,
InsertOperation,
@@ -8,9 +7,7 @@ import {
export const isInsertOperation = (op: Operation): op is InsertOperation =>
'i' in op
export const isChangeOperation = (op: Operation): op is ChangeOperation =>
'c' in op && 't' in op
export const isCommentOperation = (op: Operation): op is CommentOperation =>
'c' in op && !('t' in op)
'c' in op
export const isDeleteOperation = (op: Operation): op is DeleteOperation =>
'd' in op