Skip to content

Latest commit

 

History

History
205 lines (112 loc) · 3.47 KB

File metadata and controls

205 lines (112 loc) · 3.47 KB

collection-sync / Exports / SyncItem

Class: SyncItem

Contains an ID that identifies the synchronizable object, the document data itself, and updatedAt (which is used to determine whether the document must be synchronized or not).

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new SyncItem(id, document, updatedAt, action?)

Parameters

Name Type
id DocId
document any
updatedAt Date
action SyncItemAction

Defined in

SyncItem.ts:33

Properties

_action

Private _action: SyncItemAction

Defined in

SyncItem.ts:9


_document

Private _document: any

Defined in

SyncItem.ts:8


_id

Private _id: DocId

Defined in

SyncItem.ts:6


_updatedAt

Private _updatedAt: Date

Defined in

SyncItem.ts:7

Accessors

document

get document(): any

Returns

any

Defined in

SyncItem.ts:19


id

get id(): DocId

Returns

DocId

Defined in

SyncItem.ts:11


isDelete

get isDelete(): boolean

Determines whether the item should be removed from the database or not.

Returns

boolean

Defined in

SyncItem.ts:29


isUpdate

get isUpdate(): boolean

Determines whether the item should be updated or not.

Returns

boolean

Defined in

SyncItem.ts:24


updatedAt

get updatedAt(): Date

Returns

Date

Defined in

SyncItem.ts:15

Methods

equals

equals(other): boolean

Parameters

Name Type
other undefined | SyncItem

Returns

boolean

Defined in

SyncItem.ts:48


update

update(document, updatedAt): void

Parameters

Name Type
document any
updatedAt Date

Returns

void

Defined in

SyncItem.ts:43