This commit is contained in:
Kevin Jahns
2015-12-01 19:27:14 +01:00
parent 8d14a9cbba
commit 3a55ca4f21
10 changed files with 81 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
/* @flow */
type UserId = string
type Id = [UserId, number]
type Id = [UserId, number|string]
/*
type Struct = {
@@ -11,6 +11,7 @@ type Struct = {
target?: Id,
struct: 'Insert' | 'Delete'
}*/
type Struct = Insertion | Deletion
type Operation = Struct
@@ -31,6 +32,19 @@ type Deletion = {
struct: 'Delete'
}
type MapStruct = {
id: Id,
type: TypeNames,
map: any
}
type ListStruct = {
id: Id,
type: TypeNames,
start: Id,
end: Id
}
type MessageSyncStep1 = {
type: 'sync step 1',

View File

@@ -14,6 +14,8 @@ type YConfig = {
root: Object
}
type TypeName = 'array' | 'map' | 'text'
declare var YConcurrency_TestingMode : boolean
type Transaction<A> = Generator<any, A, any>