Skip to content

@arcmantle/chronicle / types

types

Interfaces

ChangeMeta

Defined in: types.ts:3

Properties

type

type: "set" | "delete"

Defined in: types.ts:4

collection?

optional collection: "set" | "map"

Defined in: types.ts:8

existedBefore?

optional existedBefore: boolean

Defined in: types.ts:5

groupId?

optional groupId: string

Defined in: types.ts:6

key?

optional key: any

Defined in: types.ts:9


ChangeRecord

Defined in: types.ts:36

Properties

newValue

newValue: any

Defined in: types.ts:40

oldValue

oldValue: any

Defined in: types.ts:39

path

path: string[]

Defined in: types.ts:37

timestamp

timestamp: number

Defined in: types.ts:41

type

type: ChangeType

Defined in: types.ts:38

collection?

optional collection: "set" | "map"

Defined in: types.ts:45

existedBefore?

optional existedBefore: boolean

Defined in: types.ts:42

groupId?

optional groupId: string

Defined in: types.ts:43

key?

optional key: any

Defined in: types.ts:46


ConflictResolution

Defined in: types.ts:68

Properties

strategy

strategy: MergeStrategy

Defined in: types.ts:69

value?

optional value: any

Defined in: types.ts:70


ConflictResolutions

Defined in: types.ts:73

Indexable

[pathKey: string]: ConflictResolution


DiffRecord

Defined in: types.ts:51

Properties

kind

kind: DiffKind

Defined in: types.ts:53

path

path: string[]

Defined in: types.ts:52

newValue?

optional newValue: any

Defined in: types.ts:55

oldValue?

optional oldValue: any

Defined in: types.ts:54


ListenerBucket

Defined in: types.ts:22

Properties

global

global: Set<ChangeListener>

Defined in: types.ts:23

trie

trie: PathTrieNode

Defined in: types.ts:24


ListenerOptions

Defined in: types.ts:27

Properties

debounceMs?

optional debounceMs: number

Defined in: types.ts:29

once?

optional once: boolean

Defined in: types.ts:28

schedule?

optional schedule: "sync" | "microtask"

Defined in: types.ts:31

throttleMs?

optional throttleMs: number

Defined in: types.ts:30


MergeConflict

Defined in: types.ts:59

Properties

base

base: any

Defined in: types.ts:61

ours

ours: any

Defined in: types.ts:62

path

path: string[]

Defined in: types.ts:60

theirs

theirs: any

Defined in: types.ts:63


MergeResult

Defined in: types.ts:77

Properties

applied

applied: number

Defined in: types.ts:80

conflicts

conflicts: MergeConflict[]

Defined in: types.ts:79

success

success: boolean

Defined in: types.ts:78


PathTrieNode

Defined in: types.ts:17

Properties

children

children: Map<string, PathTrieNode>

Defined in: types.ts:18

modes

modes: Map<PathMode, Set<ChangeListener>>

Defined in: types.ts:19


QueuedCall

Defined in: types.ts:84

Properties

args

args: [string[], any, any, ChangeMeta | undefined]

Defined in: types.ts:84

listener

listener: ChangeListener

Defined in: types.ts:84

Type Aliases

ChangeListener()

ChangeListener = (path, newValue, oldValue, meta?) => void

Defined in: types.ts:11

Parameters

path

string[]

newValue

any

oldValue

any

meta?

ChangeMeta

Returns

void


ChangeType

ChangeType = "set" | "delete"

Defined in: types.ts:35


DiffKind

DiffKind = "added" | "removed" | "changed"

Defined in: types.ts:50


MergeStrategy

MergeStrategy = "ours" | "theirs" | "custom"

Defined in: types.ts:66


PathMode

PathMode = "exact" | "up" | "down"

Defined in: types.ts:15


PathSelector()

PathSelector<T> = (object) => any

Defined in: types.ts:13

Type Parameters

T

T

Parameters

object

T

Returns

any

Released under the Apache-2.0 License.