@@ -132,8 +132,8 @@ Events with origin `remote` are fired when remote changes are discovered
132132during sync.
133133
134134> [ !NOTE]
135- > Automatically receiving remote changes depends on the [ caching!Caching ] ( ../../caching/classes/Caching.md ) settings
136- > for your module/paths.
135+ > Automatically receiving remote changes depends on the
136+ > [ caching ] ( ../../caching/classes/Caching.md ) settings for your module/paths.
137137
138138### ` window `
139139
@@ -164,13 +164,13 @@ you have set `config.changeEvents.window` to `true` for your RemoteStorage insta
164164}
165165```
166166
167- But when this change is pushed out by asynchronous synchronization, this change
168- may be rejected by the server, if the remote version has in the meantime changed
169- from ` white ` to for instance ` red ` ; this will then lead to a change event with
170- origin ` conflict ` ( usually a few seconds after the event with origin ` window ` ,
171- if you have those activated) . Note that since you already changed it from
172- ` white ` to ` blue ` in the local version a few seconds ago, ` oldValue ` is now
173- your local value of ` blue ` :
167+ However, when this change is pushed out by the sync process, it will be
168+ rejected by the server, if the remote version has changed in the meantime,
169+ for example from ` white ` to ` red ` . This will lead to a change event with
170+ origin ` conflict ` , usually a few seconds after the event with origin
171+ ` window ` . Note that since you already changed it from ` white ` to ` blue ` in
172+ the local version a few seconds ago, ` oldValue ` is now your local value of
173+ ` blue ` :
174174
175175``` js
176176{
@@ -196,11 +196,6 @@ conflict.
196196
197197If there is an algorithm to merge the differences between local and remote
198198versions of the data, conflicts may be automatically resolved.
199- [ storeObject] ( BaseClient.md#storeobject ) or [ storeFile] ( BaseClient.md#storefile ) must not be called synchronously from
200- the change event handler, nor by chaining Promises. [ storeObject] ( BaseClient.md#storeobject ) or
201- [ storeFile] ( BaseClient.md#storefile ) must not be called until the next iteration of the JavaScript
202- Task Queue, using for example
203- [ ` setTimeout() ` ] ( https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout ) .
204199
205200If no algorithm exists, conflict resolution typically involves displaying local
206201and remote versions to the user, and having the user merge them, or choose
@@ -223,7 +218,7 @@ corresponding `publicClient` it is `/public/<moduleName>/`.
223218
224219#### Defined in
225220
226- [ baseclient.ts:239 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L239 )
221+ [ baseclient.ts:234 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L234 )
227222
228223## Methods
229224
@@ -247,7 +242,7 @@ Usually called via [`on()`](#on)
247242
248243#### Defined in
249244
250- [ eventhandling.ts:29] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/eventhandling.ts#L29 )
245+ [ eventhandling.ts:29] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/eventhandling.ts#L29 )
251246
252247***
253248
@@ -286,7 +281,7 @@ client.cache('lists/', 'SEEN');
286281
287282#### Defined in
288283
289- [ baseclient.ts:684 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L684 )
284+ [ baseclient.ts:678 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L678 )
290285
291286***
292287
@@ -344,7 +339,7 @@ client.declareType('todo-item', {
344339
345340#### Defined in
346341
347- [ baseclient.ts:734 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L734 )
342+ [ baseclient.ts:728 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L728 )
348343
349344***
350345
@@ -420,7 +415,7 @@ Example response:
420415
421416#### Defined in
422417
423- [ baseclient.ts:395 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L395 )
418+ [ baseclient.ts:390 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L390 )
424419
425420***
426421
@@ -470,7 +465,7 @@ client.getFile('path/to/some/image').then(file => {
470465
471466#### Defined in
472467
473- [ baseclient.ts:457 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L457 )
468+ [ baseclient.ts:452 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L452 )
474469
475470***
476471
@@ -501,7 +496,7 @@ The full URL of the item, including the storage origin, or `undefined`
501496
502497#### Defined in
503498
504- [ baseclient.ts:656 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L656 )
499+ [ baseclient.ts:650 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L650 )
505500
506501***
507502
@@ -571,7 +566,7 @@ Example of a listing object:
571566
572567#### Defined in
573568
574- [ baseclient.ts:326 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L326 )
569+ [ baseclient.ts:321 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L321 )
575570
576571***
577572
@@ -607,7 +602,7 @@ client.getObject('/path/to/object').then(obj => console.log(obj));
607602
608603#### Defined in
609604
610- [ baseclient.ts:541 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L541 )
605+ [ baseclient.ts:536 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L536 )
611606
612607***
613608
@@ -643,13 +638,13 @@ remoteStorage.on('connected', function() {
643638
644639#### Defined in
645640
646- [ eventhandling.ts:55] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/eventhandling.ts#L55 )
641+ [ eventhandling.ts:55] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/eventhandling.ts#L55 )
647642
648643***
649644
650645### remove()
651646
652- > ** remove** (` path ` ): ` Promise ` \< ` unknown ` \>
647+ > ** remove** (` path ` ): ` Promise ` \< ` QueuedRequestResponse ` \>
653648
654649Remove node at given path from storage. Triggers synchronization.
655650
@@ -661,7 +656,7 @@ Path relative to the module root.
661656
662657#### Returns
663658
664- ` Promise ` \< ` unknown ` \>
659+ ` Promise ` \< ` QueuedRequestResponse ` \>
665660
666661#### Example
667662
@@ -671,7 +666,7 @@ client.remove('path/to/object').then(() => console.log('item deleted'));
671666
672667#### Defined in
673668
674- [ baseclient.ts:630 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L630 )
669+ [ baseclient.ts:624 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L624 )
675670
676671***
677672
@@ -693,7 +688,7 @@ Remove a previously installed event handler
693688
694689#### Defined in
695690
696- [ eventhandling.ts:62] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/eventhandling.ts#L62 )
691+ [ eventhandling.ts:62] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/eventhandling.ts#L62 )
697692
698693***
699694
@@ -718,7 +713,7 @@ A new `BaseClient` operating on a subpath of the current base path
718713
719714#### Defined in
720715
721- [ baseclient.ts:272 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L272 )
716+ [ baseclient.ts:267 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L267 )
722717
723718***
724719
@@ -774,7 +769,7 @@ fileReader.readAsArrayBuffer(file);
774769
775770#### Defined in
776771
777- [ baseclient.ts:503 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L503 )
772+ [ baseclient.ts:498 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L498 )
778773
779774***
780775
@@ -827,7 +822,7 @@ client.storeObject('bookmark', path, bookmark)
827822
828823#### Defined in
829824
830- [ baseclient.ts:589 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L589 )
825+ [ baseclient.ts:584 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L584 )
831826
832827***
833828
@@ -864,4 +859,4 @@ var result = client.validate(document);
864859
865860#### Defined in
866861
867- [ baseclient.ts:766 ] ( https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e /src/baseclient.ts#L766 )
862+ [ baseclient.ts:760 ] ( https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54 /src/baseclient.ts#L760 )
0 commit comments