@dittolive/ditto 4.8.2 → 4.8.4-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/node/ditto.cjs.js +172 -14
- package/node/ditto.darwin-arm64.node +0 -0
- package/node/ditto.darwin-x64.node +0 -0
- package/node/ditto.linux-arm.node +0 -0
- package/node/ditto.linux-arm64.node +0 -0
- package/node/ditto.linux-x64.node +0 -0
- package/node/ditto.win32-x64.node +0 -0
- package/package.json +1 -1
- package/react-native/ditto.es6.js +1 -1
- package/types/ditto.d.ts +182 -11
- package/web/ditto.es6.js +1 -1
- package/web/ditto.umd.js +1 -1
- package/web/ditto.wasm +0 -0
package/types/ditto.d.ts
CHANGED
|
@@ -547,6 +547,8 @@ declare class NotAvailableAuthenticator extends Authenticator {
|
|
|
547
547
|
/**
|
|
548
548
|
* Represents a CRDT counter that can be upserted as part of a document or
|
|
549
549
|
* assigned to a property during an update of a document.
|
|
550
|
+
*
|
|
551
|
+
* Not available in React Native environments.
|
|
550
552
|
*/
|
|
551
553
|
declare class Counter {
|
|
552
554
|
/** The value of the counter. */
|
|
@@ -576,6 +578,8 @@ declare class MutableCounter extends Counter {
|
|
|
576
578
|
* {@link PendingCursorOperation.update | PendingCursorOperation.update()} and
|
|
577
579
|
* {@link PendingIDSpecificOperation.update | PendingIDSpecificOperation.update()},
|
|
578
580
|
* otherwise an exception is thrown.
|
|
581
|
+
*
|
|
582
|
+
* @throws {Error} when called in a React Native environment.
|
|
579
583
|
*/
|
|
580
584
|
increment(amount: number): void;
|
|
581
585
|
/** @internal */
|
|
@@ -585,6 +589,8 @@ declare class MutableCounter extends Counter {
|
|
|
585
589
|
/**
|
|
586
590
|
* Represents a CRDT register that can be upserted as part of a document or
|
|
587
591
|
* assigned to a property during an update of a document.
|
|
592
|
+
*
|
|
593
|
+
* Not available in React Native environments.
|
|
588
594
|
*/
|
|
589
595
|
declare class Register {
|
|
590
596
|
/** Returns the value of the register. */
|
|
@@ -607,13 +613,22 @@ declare class Register {
|
|
|
607
613
|
* updating a document.
|
|
608
614
|
*
|
|
609
615
|
* This class can't be instantiated directly, it's returned automatically for
|
|
610
|
-
* any register property of a document within an update block via
|
|
616
|
+
* any register property of a document within an update block via
|
|
617
|
+
* {@link MutableDocumentPath.register}.
|
|
618
|
+
*
|
|
619
|
+
* Not available in React Native environments.
|
|
611
620
|
*/
|
|
612
621
|
declare class MutableRegister extends Register {
|
|
613
|
-
/**
|
|
622
|
+
/**
|
|
623
|
+
* Returns the value of the register.
|
|
624
|
+
*
|
|
625
|
+
* Not available in React Native environments.
|
|
626
|
+
*/
|
|
614
627
|
get value(): any;
|
|
615
628
|
/**
|
|
616
629
|
* Convenience setter, equivalent to {@link set | set()}.
|
|
630
|
+
*
|
|
631
|
+
* Not available in React Native environments.
|
|
617
632
|
*/
|
|
618
633
|
set value(value: any);
|
|
619
634
|
/**
|
|
@@ -623,6 +638,8 @@ declare class MutableRegister extends Register {
|
|
|
623
638
|
* {@link PendingCursorOperation.update | PendingCursorOperation.update()} and
|
|
624
639
|
* {@link PendingIDSpecificOperation.update | PendingIDSpecificOperation.update()},
|
|
625
640
|
* otherwise an exception is thrown.
|
|
641
|
+
*
|
|
642
|
+
* Not available in React Native environments.
|
|
626
643
|
*/
|
|
627
644
|
set(value: any): void;
|
|
628
645
|
/** @internal */
|
|
@@ -686,6 +703,8 @@ declare class AttachmentToken {
|
|
|
686
703
|
* type. You don't create a `DocumentPath` directly but obtain one via the
|
|
687
704
|
* {@link Document.path | path} property or the {@link Document.at | at()}
|
|
688
705
|
* method of {@link Document}.
|
|
706
|
+
*
|
|
707
|
+
* Not available in React Native environments.
|
|
689
708
|
*/
|
|
690
709
|
declare class DocumentPath {
|
|
691
710
|
/** The document this path belongs to. */
|
|
@@ -710,26 +729,36 @@ declare class DocumentPath {
|
|
|
710
729
|
* - `documentPath.at('passengers[2]')`
|
|
711
730
|
* - `documentPath.at('passengers[2].belongings[1].kind')`
|
|
712
731
|
* - `documentPath.at('.mileage')`
|
|
732
|
+
*
|
|
733
|
+
* @throws {Error} when called in a React Native environment.
|
|
713
734
|
*/
|
|
714
735
|
at(keyPathOrIndex: string | number): DocumentPath;
|
|
715
736
|
/**
|
|
716
737
|
* Traverses the document with the key-path represented by the receiver and
|
|
717
738
|
* returns the corresponding object or value.
|
|
739
|
+
*
|
|
740
|
+
* @throws {Error} when called in a React Native environment.
|
|
718
741
|
*/
|
|
719
742
|
get value(): any | undefined;
|
|
720
743
|
/**
|
|
721
744
|
* Returns the value at the previously specified key in the document as a
|
|
722
745
|
* {@link Counter} if possible, otherwise returns `null`.
|
|
746
|
+
*
|
|
747
|
+
* @throws {Error} when called in a React Native environment.
|
|
723
748
|
*/
|
|
724
749
|
get counter(): Counter | null;
|
|
725
750
|
/**
|
|
726
751
|
* Returns the value at the previously specified key in the document as a
|
|
727
752
|
* {@link Register} if possible, otherwise returns `null`.
|
|
753
|
+
*
|
|
754
|
+
* @throws {Error} when called in a React Native environment.
|
|
728
755
|
*/
|
|
729
756
|
get register(): Register | null;
|
|
730
757
|
/**
|
|
731
758
|
* Returns the value at the previously specified key in the document as an
|
|
732
759
|
* {@link AttachmentToken} if possible, otherwise returns `null`.
|
|
760
|
+
*
|
|
761
|
+
* @throws {Error} when called in a React Native environment.
|
|
733
762
|
*/
|
|
734
763
|
get attachmentToken(): AttachmentToken | null;
|
|
735
764
|
/** @internal */
|
|
@@ -742,6 +771,8 @@ declare class DocumentPath {
|
|
|
742
771
|
* a specific key-path. You don't create a `MutableDocumentPath` directly but
|
|
743
772
|
* obtain one via the {@link MutableDocument.path | path} property or the
|
|
744
773
|
* {@link MutableDocument.at | at()} method of {@link MutableDocument}.
|
|
774
|
+
*
|
|
775
|
+
* Not available in React Native environments.
|
|
745
776
|
*/
|
|
746
777
|
declare class MutableDocumentPath {
|
|
747
778
|
/** The (mutable) document this path belongs to. */
|
|
@@ -766,26 +797,36 @@ declare class MutableDocumentPath {
|
|
|
766
797
|
* - `mutableDocumentPath.at('passengers[2]')`
|
|
767
798
|
* - `mutableDocumentPath.at('passengers[2].belongings[1].kind')`
|
|
768
799
|
* - `mutableDocumentPath.at('.mileage')`
|
|
800
|
+
*
|
|
801
|
+
* @throws {Error} when called in a React Native environment.
|
|
769
802
|
*/
|
|
770
803
|
at(keyPathOrIndex: string | number): MutableDocumentPath;
|
|
771
804
|
/**
|
|
772
805
|
* Traverses the document with the key-path represented by the receiver and
|
|
773
806
|
* returns the corresponding object or value.
|
|
807
|
+
*
|
|
808
|
+
* @throws {Error} when called in a React Native environment.
|
|
774
809
|
*/
|
|
775
810
|
get value(): any | undefined;
|
|
776
811
|
/**
|
|
777
812
|
* Returns the value at the previously specified key in the document as a
|
|
778
813
|
* {@link MutableCounter} if possible, otherwise returns `null`.
|
|
814
|
+
*
|
|
815
|
+
* @throws {Error} when called in a React Native environment.
|
|
779
816
|
*/
|
|
780
817
|
get counter(): MutableCounter | null;
|
|
781
818
|
/**
|
|
782
819
|
* Returns the value at the previously specified key in the document as a
|
|
783
820
|
* {@link MutableRegister} if possible, otherwise returns `null`.
|
|
821
|
+
*
|
|
822
|
+
* @throws {Error} when called in a React Native environment.
|
|
784
823
|
*/
|
|
785
824
|
get register(): MutableRegister | null;
|
|
786
825
|
/**
|
|
787
826
|
* Returns the value at the previously specified key in the document as a
|
|
788
827
|
* {@link AttachmentToken} if possible, otherwise returns `null`.
|
|
828
|
+
*
|
|
829
|
+
* @throws {Error} when called in a React Native environment.
|
|
789
830
|
*/
|
|
790
831
|
get attachmentToken(): AttachmentToken | null;
|
|
791
832
|
/**
|
|
@@ -795,10 +836,14 @@ declare class MutableDocumentPath {
|
|
|
795
836
|
* default value. Set this to `true` if you want to set a default value that
|
|
796
837
|
* you expect to be overwritten by other devices in the network. The default
|
|
797
838
|
* value is `false`.
|
|
839
|
+
*
|
|
840
|
+
* @throws {Error} when called in a React Native environment.
|
|
798
841
|
*/
|
|
799
842
|
set(value: any, isDefault?: boolean): void;
|
|
800
843
|
/**
|
|
801
844
|
* Removes a value at the document's key-path defined by the receiver.
|
|
845
|
+
*
|
|
846
|
+
* @throws {Error} when called in a React Native environment.
|
|
802
847
|
*/
|
|
803
848
|
remove(): void;
|
|
804
849
|
/** @internal */
|
|
@@ -828,6 +873,8 @@ type UpdateResultType = 'set' | 'incremented' | 'removed';
|
|
|
828
873
|
* - `set`
|
|
829
874
|
* - `removed`
|
|
830
875
|
* - `incremented`
|
|
876
|
+
*
|
|
877
|
+
* Not available in React Native environments.
|
|
831
878
|
*/
|
|
832
879
|
declare class UpdateResult {
|
|
833
880
|
/** The update result's type. */
|
|
@@ -864,33 +911,49 @@ declare const CUSTOM_INSPECT_SYMBOL$1: unique symbol;
|
|
|
864
911
|
* `-Infinity`).
|
|
865
912
|
*/
|
|
866
913
|
type DocumentValue = Record<string, any>;
|
|
867
|
-
/**
|
|
914
|
+
/**
|
|
915
|
+
* A document belonging to a {@link Collection} with an inner value.
|
|
916
|
+
*
|
|
917
|
+
* Not available in React Native environments.
|
|
918
|
+
*/
|
|
868
919
|
declare class Document {
|
|
869
920
|
/**
|
|
870
921
|
* Returns a hash that represents the passed in document(s).
|
|
922
|
+
*
|
|
923
|
+
* @throws {Error} when called in a React Native environment.
|
|
871
924
|
*/
|
|
872
925
|
static hash(documentOrMany: Document | Document[]): BigInt;
|
|
873
926
|
/**
|
|
874
927
|
* Returns a pattern of words that together create a mnemonic, which
|
|
875
928
|
* represents the passed in document(s).
|
|
929
|
+
*
|
|
930
|
+
* @throws {Error} when called in a React Native environment.
|
|
876
931
|
*/
|
|
877
932
|
static hashMnemonic(documentOrMany: Document | Document[]): string;
|
|
878
933
|
/**
|
|
879
934
|
* Returns the document ID.
|
|
935
|
+
*
|
|
936
|
+
* @throws {Error} when called in a React Native environment.
|
|
880
937
|
*/
|
|
881
938
|
get id(): DocumentID;
|
|
882
939
|
/**
|
|
883
940
|
* Returns the document path at the root of the document.
|
|
941
|
+
*
|
|
942
|
+
* @throws {Error} when called in a React Native environment.
|
|
884
943
|
*/
|
|
885
944
|
get path(): DocumentPath;
|
|
886
945
|
/**
|
|
887
946
|
* Convenience property, same as calling `path.value`. The value is cached on
|
|
888
947
|
* first access and returned on subsequent calls without calling `path.value`
|
|
889
948
|
* again.
|
|
949
|
+
*
|
|
950
|
+
* @throws {Error} when called in a React Native environment.
|
|
890
951
|
*/
|
|
891
952
|
get value(): DocumentValue;
|
|
892
953
|
/**
|
|
893
954
|
* Convenience method, same as calling `path.at()`.
|
|
955
|
+
*
|
|
956
|
+
* @throws {Error} when called in a React Native environment.
|
|
894
957
|
*/
|
|
895
958
|
at(keyPathOrIndex: string | number): DocumentPath;
|
|
896
959
|
/** @internal */
|
|
@@ -917,22 +980,32 @@ declare class Document {
|
|
|
917
980
|
* `MutableDocument` directly but rather through the `update()` methods of
|
|
918
981
|
* {@link PendingCursorOperation.update | PendingCursorOperation} and
|
|
919
982
|
* {@link PendingIDSpecificOperation.update | PendingIDSpecificOperation}.
|
|
983
|
+
*
|
|
984
|
+
* Not available in React Native environments.
|
|
920
985
|
*/
|
|
921
986
|
declare class MutableDocument {
|
|
922
987
|
/**
|
|
923
988
|
* Returns the ID of the document.
|
|
989
|
+
*
|
|
990
|
+
* @throws {Error} when called in a React Native environment.
|
|
924
991
|
*/
|
|
925
992
|
get id(): DocumentID;
|
|
926
993
|
/**
|
|
927
994
|
* Returns the document path at the root of the document.
|
|
995
|
+
*
|
|
996
|
+
* @throws {Error} when called in a React Native environment.
|
|
928
997
|
*/
|
|
929
998
|
get path(): MutableDocumentPath;
|
|
930
999
|
/**
|
|
931
1000
|
* Convenience property, same as `path.value`.
|
|
1001
|
+
*
|
|
1002
|
+
* @throws {Error} when called in a React Native environment.
|
|
932
1003
|
*/
|
|
933
1004
|
get value(): DocumentValue;
|
|
934
1005
|
/**
|
|
935
1006
|
* Convenience method, same as calling `path.at()`.
|
|
1007
|
+
*
|
|
1008
|
+
* @throws {Error} when called in a React Native environment.
|
|
936
1009
|
*/
|
|
937
1010
|
at(keyPathOrIndex: string | number): MutableDocumentPath;
|
|
938
1011
|
/** @internal */
|
|
@@ -1864,6 +1937,11 @@ declare class SubscriptionManager {
|
|
|
1864
1937
|
* While {@link Subscription} objects remain in scope they ensure that
|
|
1865
1938
|
* documents in the collection specified and that match the query provided will
|
|
1866
1939
|
* try to be kept up-to-date with the latest changes from remote peers.
|
|
1940
|
+
*
|
|
1941
|
+
* This class is used by Ditto's query builder APIs.
|
|
1942
|
+
* @see {@link SyncSubscription} for the DQL equivalent.
|
|
1943
|
+
*
|
|
1944
|
+
* Not available in React Native environments.
|
|
1867
1945
|
*/
|
|
1868
1946
|
declare class Subscription {
|
|
1869
1947
|
/**
|
|
@@ -1932,6 +2010,8 @@ declare class LiveQueryManager {
|
|
|
1932
2010
|
* your event handler be called when there is an update to a document matching
|
|
1933
2011
|
* the query you provide. When you no longer want to receive updates about
|
|
1934
2012
|
* documents matching a query then you must call {@link stop | stop()}.
|
|
2013
|
+
*
|
|
2014
|
+
* Not available in React Native environments.
|
|
1935
2015
|
*/
|
|
1936
2016
|
declare class LiveQuery {
|
|
1937
2017
|
/** The query that the live query is based on. */
|
|
@@ -1944,6 +2024,8 @@ declare class LiveQuery {
|
|
|
1944
2024
|
get isStopped(): boolean;
|
|
1945
2025
|
/**
|
|
1946
2026
|
* Stop the live query from delivering updates.
|
|
2027
|
+
*
|
|
2028
|
+
* @throws {Error} when called in a React Native environment.
|
|
1947
2029
|
*/
|
|
1948
2030
|
stop(): void;
|
|
1949
2031
|
/** @internal */
|
|
@@ -1976,6 +2058,8 @@ declare class LiveQuery {
|
|
|
1976
2058
|
* {@link UpdateResult | update results}. This is the data structure you get
|
|
1977
2059
|
* when {@link PendingCursorOperation.update | updating} a set of documents
|
|
1978
2060
|
* with detailed info about the performed updates.
|
|
2061
|
+
*
|
|
2062
|
+
* Not available in React Native environments.
|
|
1979
2063
|
*/
|
|
1980
2064
|
declare class UpdateResultsMap {
|
|
1981
2065
|
/**
|
|
@@ -2003,11 +2087,14 @@ declare class UpdateResultsMap {
|
|
|
2003
2087
|
* return value, or chain calls to update, evict or remove the document.
|
|
2004
2088
|
*
|
|
2005
2089
|
* Live queries and subscriptions are only available outside of a transaction.
|
|
2090
|
+
*
|
|
2091
|
+
* Not available in React Native environments.
|
|
2006
2092
|
*/
|
|
2007
2093
|
declare abstract class BasePendingIDSpecificOperation implements PromiseLike<Document | undefined> {
|
|
2008
2094
|
/**
|
|
2009
2095
|
* Removes the document with the matching ID.
|
|
2010
2096
|
*
|
|
2097
|
+
* @throws {Error} when called in a React Native environment.
|
|
2011
2098
|
* @returns `true` promise if the document was found and removed. `false`
|
|
2012
2099
|
* promise if the document wasn't found and therefore wasn't removed.
|
|
2013
2100
|
*/
|
|
@@ -2015,6 +2102,7 @@ declare abstract class BasePendingIDSpecificOperation implements PromiseLike<Doc
|
|
|
2015
2102
|
/**
|
|
2016
2103
|
* Evicts the document with the matching ID.
|
|
2017
2104
|
*
|
|
2105
|
+
* @throws {Error} when called in a React Native environment.
|
|
2018
2106
|
* @returns `true` promise if the document was found and evicted. `false`
|
|
2019
2107
|
* promise if the document wasn't found and therefore wasn't evicted.
|
|
2020
2108
|
*/
|
|
@@ -2030,6 +2118,7 @@ declare abstract class BasePendingIDSpecificOperation implements PromiseLike<Doc
|
|
|
2030
2118
|
* update-related functions on it. If the document is not found then the value
|
|
2031
2119
|
* provided to the closure will be `undefined`.
|
|
2032
2120
|
*
|
|
2121
|
+
* @throws {Error} when called in a React Native environment.
|
|
2033
2122
|
* @return An array promise of {@link UpdateResult | update results} that
|
|
2034
2123
|
* describe the updates that were performed on the document.
|
|
2035
2124
|
*/
|
|
@@ -2041,6 +2130,7 @@ declare abstract class BasePendingIDSpecificOperation implements PromiseLike<Doc
|
|
|
2041
2130
|
/**
|
|
2042
2131
|
* Executes the find operation to return the document with the matching ID.
|
|
2043
2132
|
*
|
|
2133
|
+
* @throws {Error} when called in a React Native environment.
|
|
2044
2134
|
* @returns The {@link Document} promise with the ID provided in the
|
|
2045
2135
|
* {@link Collection.findByID | findByID()} call or `undefined` if the document was
|
|
2046
2136
|
* not found.
|
|
@@ -2076,11 +2166,14 @@ interface CollectionInterface {
|
|
|
2076
2166
|
* @param query The query to run against the collection.
|
|
2077
2167
|
* @param queryArgs These arguments replace placeholders in the provided
|
|
2078
2168
|
* query.
|
|
2169
|
+
* @throws {Error} when called in a React Native environment.
|
|
2079
2170
|
*/
|
|
2080
2171
|
find(query: string, queryArgs?: QueryArguments): BasePendingCursorOperation;
|
|
2081
2172
|
/**
|
|
2082
2173
|
* Convenience method, equivalent to calling {@link find | find()} and passing
|
|
2083
2174
|
* the query `"true"`.
|
|
2175
|
+
*
|
|
2176
|
+
* @throws {Error} when called in a React Native environment.
|
|
2084
2177
|
*/
|
|
2085
2178
|
findAll(): BasePendingCursorOperation;
|
|
2086
2179
|
/**
|
|
@@ -2089,6 +2182,7 @@ interface CollectionInterface {
|
|
|
2089
2182
|
* Use the returned cursor instance to chain operations on the search result.
|
|
2090
2183
|
*
|
|
2091
2184
|
* @param id The document's identifier
|
|
2185
|
+
* @throws {Error} when called in a React Native environment.
|
|
2092
2186
|
*/
|
|
2093
2187
|
findByID(id: DocumentID | DocumentIDValue): BasePendingIDSpecificOperation;
|
|
2094
2188
|
/**
|
|
@@ -2107,15 +2201,20 @@ interface CollectionInterface {
|
|
|
2107
2201
|
* not contain any non-finite numbers (NaN, Infinity, -Infinity).
|
|
2108
2202
|
* @param options Change defaults for the behavior of the operation, such as
|
|
2109
2203
|
* the write strategy.
|
|
2204
|
+
* @throws {Error} when called in a React Native environment.
|
|
2110
2205
|
*/
|
|
2111
2206
|
upsert(value: DocumentValue, options: UpsertOptions): Promise<DocumentID>;
|
|
2112
2207
|
}
|
|
2113
2208
|
|
|
2209
|
+
/**
|
|
2210
|
+
* Not available in React Native environments.
|
|
2211
|
+
*/
|
|
2114
2212
|
declare abstract class BasePendingCursorOperation implements PromiseLike<Document[]> {
|
|
2115
2213
|
/**
|
|
2116
2214
|
* Removes all documents that match the query generated by the preceding
|
|
2117
2215
|
* function chaining.
|
|
2118
2216
|
*
|
|
2217
|
+
* @throws {Error} when called in a React Native environment.
|
|
2119
2218
|
* @returns An array promise containing the IDs of the documents that were
|
|
2120
2219
|
* removed.
|
|
2121
2220
|
*/
|
|
@@ -2124,6 +2223,7 @@ declare abstract class BasePendingCursorOperation implements PromiseLike<Documen
|
|
|
2124
2223
|
* Evicts all documents that match the query generated by the preceding
|
|
2125
2224
|
* function chaining.
|
|
2126
2225
|
*
|
|
2226
|
+
* @throws {Error} when called in a React Native environment.
|
|
2127
2227
|
* @return An array promise containing the IDs of the documents that were
|
|
2128
2228
|
* evicted.
|
|
2129
2229
|
*/
|
|
@@ -2139,6 +2239,7 @@ declare abstract class BasePendingCursorOperation implements PromiseLike<Documen
|
|
|
2139
2239
|
* matching the query. The documents are instances of {@link MutableDocument}
|
|
2140
2240
|
* so you can call update-related functions on them.
|
|
2141
2241
|
*
|
|
2242
|
+
* @throws {Error} when called in a React Native environment.
|
|
2142
2243
|
* @returns An {@link UpdateResultsMap} promise mapping document IDs to lists
|
|
2143
2244
|
* of {@link UpdateResult | update results} that describe the updates that
|
|
2144
2245
|
* were performed for each document.
|
|
@@ -2162,6 +2263,7 @@ declare abstract class BasePendingCursorOperation implements PromiseLike<Documen
|
|
|
2162
2263
|
* @param direction Specify whether you want the sorting order to be
|
|
2163
2264
|
* `ascending` or `descending`. Defaults to `ascending`.
|
|
2164
2265
|
*
|
|
2266
|
+
* @throws {Error} when called in a React Native environment.
|
|
2165
2267
|
* @return A cursor that you can chain further function calls and then either
|
|
2166
2268
|
* get the matching documents immediately or get updates about them over time.
|
|
2167
2269
|
*/
|
|
@@ -2178,6 +2280,7 @@ declare abstract class BasePendingCursorOperation implements PromiseLike<Documen
|
|
|
2178
2280
|
* @param offset The number of matching documents that you want the eventual
|
|
2179
2281
|
* resulting set of matching documents to be offset by (and thus not include).
|
|
2180
2282
|
*
|
|
2283
|
+
* @throws {Error} when called in a React Native environment.
|
|
2181
2284
|
* @return A cursor that you can chain further function calls and then either
|
|
2182
2285
|
* get the matching documents immediately or get updates about them over time.
|
|
2183
2286
|
*/
|
|
@@ -2188,6 +2291,7 @@ declare abstract class BasePendingCursorOperation implements PromiseLike<Documen
|
|
|
2188
2291
|
*
|
|
2189
2292
|
* @param limit The maximum number of documents that will be returned.
|
|
2190
2293
|
*
|
|
2294
|
+
* @throws {Error} when called in a React Native environment.
|
|
2191
2295
|
* @return A cursor that you can chain further function calls and then either
|
|
2192
2296
|
* get the matching documents immediately or get updates about them over time.
|
|
2193
2297
|
*/
|
|
@@ -2196,6 +2300,7 @@ declare abstract class BasePendingCursorOperation implements PromiseLike<Documen
|
|
|
2196
2300
|
* Executes the query generated by the preceding function chaining and return
|
|
2197
2301
|
* the list of matching documents.
|
|
2198
2302
|
*
|
|
2303
|
+
* @throws {Error} when called in a React Native environment.
|
|
2199
2304
|
* @returns An array promise containing {@link Document | documents} matching
|
|
2200
2305
|
* the query generated by the preceding function chaining.
|
|
2201
2306
|
*/
|
|
@@ -2256,6 +2361,8 @@ interface LiveQueryEventUpdateParams {
|
|
|
2256
2361
|
/**
|
|
2257
2362
|
* First event fired immediately after registering a live query without any
|
|
2258
2363
|
* mutations. All subsequent events are of type {@link LiveQueryEventUpdate}.
|
|
2364
|
+
*
|
|
2365
|
+
* Not available in React Native environments.
|
|
2259
2366
|
*/
|
|
2260
2367
|
declare class LiveQueryEventInitial {
|
|
2261
2368
|
/**
|
|
@@ -2280,6 +2387,8 @@ declare class LiveQueryEventInitial {
|
|
|
2280
2387
|
/**
|
|
2281
2388
|
* Represents an update event describing all changes that occured for documents
|
|
2282
2389
|
* covered by a (live) query.
|
|
2390
|
+
*
|
|
2391
|
+
* Not available in React Native environments.
|
|
2283
2392
|
*/
|
|
2284
2393
|
declare class LiveQueryEventUpdate {
|
|
2285
2394
|
/**
|
|
@@ -2317,6 +2426,7 @@ declare class LiveQueryEventUpdate {
|
|
|
2317
2426
|
/**
|
|
2318
2427
|
* Returns a hash that represents the set of matching documents.
|
|
2319
2428
|
*
|
|
2429
|
+
* @throws {Error} when called in a React Native environment.
|
|
2320
2430
|
* @deprecated use {@link Document.hash | Document.hash()} instead.
|
|
2321
2431
|
*/
|
|
2322
2432
|
hash(documents: Document[]): BigInt;
|
|
@@ -2324,6 +2434,7 @@ declare class LiveQueryEventUpdate {
|
|
|
2324
2434
|
* Returns a pattern of words that together create a mnemonic, which
|
|
2325
2435
|
* represents the set of matching documents.
|
|
2326
2436
|
*
|
|
2437
|
+
* @throws {Error} when called in a React Native environment.
|
|
2327
2438
|
* @deprecated use {@link Document.hashMnemonic | Document.hashMnemonic()} instead.
|
|
2328
2439
|
*/
|
|
2329
2440
|
hashMnemonic(documents: Document[]): string;
|
|
@@ -2392,6 +2503,8 @@ type QueryObservationHandler = (documents: Document[], event: LiveQueryEvent, si
|
|
|
2392
2503
|
* preceding `find`-like call.
|
|
2393
2504
|
*
|
|
2394
2505
|
* Update and remove functionality is also exposed through this object.
|
|
2506
|
+
*
|
|
2507
|
+
* Not available in React Native environments.
|
|
2395
2508
|
*/
|
|
2396
2509
|
declare class PendingCursorOperation extends BasePendingCursorOperation {
|
|
2397
2510
|
sort(propertyPath: string, direction?: SortDirection): PendingCursorOperation;
|
|
@@ -2411,6 +2524,8 @@ declare class PendingCursorOperation extends BasePendingCursorOperation {
|
|
|
2411
2524
|
* The returned {@link Subscription} object must be kept in scope for as long
|
|
2412
2525
|
* as you want to keep receiving updates.
|
|
2413
2526
|
*
|
|
2527
|
+
* @throws {Error} when called in a React Native environment.
|
|
2528
|
+
*
|
|
2414
2529
|
* @returns A {@link Subscription} object that must be kept in scope for as
|
|
2415
2530
|
* long as you want to keep receiving updates for documents that match the
|
|
2416
2531
|
* query specified in the preceding chain.
|
|
@@ -2437,6 +2552,8 @@ declare class PendingCursorOperation extends BasePendingCursorOperation {
|
|
|
2437
2552
|
* transaction committed to the store that involves modifications to documents
|
|
2438
2553
|
* matching the query in the collection this method was called on.
|
|
2439
2554
|
*
|
|
2555
|
+
* @throws {Error} when called in a React Native environment.
|
|
2556
|
+
*
|
|
2440
2557
|
* @return A {@link LiveQuery} object that must be kept in scope for as long
|
|
2441
2558
|
* as you want to keep receiving updates.
|
|
2442
2559
|
*/
|
|
@@ -2464,6 +2581,8 @@ declare class PendingCursorOperation extends BasePendingCursorOperation {
|
|
|
2464
2581
|
* documents matching the query in the collection that this method was called
|
|
2465
2582
|
* on.
|
|
2466
2583
|
*
|
|
2584
|
+
* @throws {Error} when called in a React Native environment.
|
|
2585
|
+
*
|
|
2467
2586
|
* @return A {@link LiveQuery} object that must be kept in scope for as long
|
|
2468
2587
|
* as you want to keep receiving updates.
|
|
2469
2588
|
*/
|
|
@@ -2498,6 +2617,8 @@ type SingleObservationHandler = (document: Document | null, event: SingleDocumen
|
|
|
2498
2617
|
* {@link Collection.findByID | findByID()} call.
|
|
2499
2618
|
*
|
|
2500
2619
|
* Update and remove functionality is also exposed through this object.
|
|
2620
|
+
*
|
|
2621
|
+
* Not available in React Native environments.
|
|
2501
2622
|
*/
|
|
2502
2623
|
declare class PendingIDSpecificOperation extends BasePendingIDSpecificOperation {
|
|
2503
2624
|
remove(): Promise<boolean>;
|
|
@@ -2514,6 +2635,8 @@ declare class PendingIDSpecificOperation extends BasePendingIDSpecificOperation
|
|
|
2514
2635
|
* The returned {@link Subscription} object must be kept in scope for as long
|
|
2515
2636
|
* as you want to keep receiving updates.
|
|
2516
2637
|
*
|
|
2638
|
+
* @throws {Error} when called in a React Native environment.
|
|
2639
|
+
*
|
|
2517
2640
|
* @returns A {@link Subscription} object that must be kept in scope for as
|
|
2518
2641
|
* long as you want to keep receiving updates for the document.
|
|
2519
2642
|
*/
|
|
@@ -2537,6 +2660,8 @@ declare class PendingIDSpecificOperation extends BasePendingIDSpecificOperation
|
|
|
2537
2660
|
* document with the relevant ID in the collection that
|
|
2538
2661
|
* {@link PendingIDSpecificOperation.observeLocal | observeLocal()} was called on.
|
|
2539
2662
|
*
|
|
2663
|
+
* @throws {Error} when called in a React Native environment.
|
|
2664
|
+
*
|
|
2540
2665
|
* @returns A {@link LiveQuery} object that must be kept in scope for as long
|
|
2541
2666
|
* as you want to keep receiving updates.
|
|
2542
2667
|
*/
|
|
@@ -2561,6 +2686,8 @@ declare class PendingIDSpecificOperation extends BasePendingIDSpecificOperation
|
|
|
2561
2686
|
* document with the relevant ID in the collection that
|
|
2562
2687
|
* {@link PendingIDSpecificOperation.observeLocal | observeLocal()} was called on.
|
|
2563
2688
|
*
|
|
2689
|
+
* @throws {Error} when called in a React Native environment.
|
|
2690
|
+
*
|
|
2564
2691
|
* @returns A {@link LiveQuery} object that must be kept in scope for as long
|
|
2565
2692
|
* as you want to keep receiving updates.
|
|
2566
2693
|
*/
|
|
@@ -2578,6 +2705,8 @@ declare class PendingIDSpecificOperation extends BasePendingIDSpecificOperation
|
|
|
2578
2705
|
* querying a collection. You can get a collection by calling
|
|
2579
2706
|
* {@link Store.collection | collection()} on a {@link Store} of a {@link Ditto}
|
|
2580
2707
|
* object.
|
|
2708
|
+
*
|
|
2709
|
+
* Not available in React Native environments.
|
|
2581
2710
|
*/
|
|
2582
2711
|
declare class Collection implements CollectionInterface {
|
|
2583
2712
|
/** The name of the collection. */
|
|
@@ -2602,6 +2731,7 @@ declare class Collection implements CollectionInterface {
|
|
|
2602
2731
|
* Find more information about the query string format in the documentation's
|
|
2603
2732
|
* section on {@link https://docs.ditto.live/javascript/common/concepts/querying Querying}
|
|
2604
2733
|
*
|
|
2734
|
+
* @throws {Error} when called in a React Native environment.
|
|
2605
2735
|
* @param query The query to run against the collection.
|
|
2606
2736
|
* @param queryArgs The arguments to use to replace placeholders in the
|
|
2607
2737
|
* provided query.
|
|
@@ -2620,6 +2750,7 @@ declare class Collection implements CollectionInterface {
|
|
|
2620
2750
|
* remove or evict the document.
|
|
2621
2751
|
*
|
|
2622
2752
|
* @param id The ID of the document to find.
|
|
2753
|
+
* @throws {Error} when called in a React Native environment.
|
|
2623
2754
|
*/
|
|
2624
2755
|
findByID(id: DocumentID | DocumentIDValue): PendingIDSpecificOperation;
|
|
2625
2756
|
upsert(value: DocumentValue, options?: UpsertOptions): Promise<DocumentID>;
|
|
@@ -2646,9 +2777,10 @@ declare class Collection implements CollectionInterface {
|
|
|
2646
2777
|
*
|
|
2647
2778
|
* @param pathOrData The path to the file that you want to create an
|
|
2648
2779
|
* attachment with or the raw data.
|
|
2649
|
-
*
|
|
2650
2780
|
* @param metadata Metadata relating to the attachment.
|
|
2651
2781
|
*
|
|
2782
|
+
* @throws {Error} when called in a React Native environment.
|
|
2783
|
+
*
|
|
2652
2784
|
* @deprecated Use {@link Store.newAttachment | ditto.store.newAttachment() }
|
|
2653
2785
|
* instead.
|
|
2654
2786
|
*/
|
|
@@ -2671,10 +2803,11 @@ declare class Collection implements CollectionInterface {
|
|
|
2671
2803
|
*
|
|
2672
2804
|
* @param token The {@link AttachmentToken} relevant to the attachment that
|
|
2673
2805
|
* you wish to download and observe. Throws if token is invalid.
|
|
2674
|
-
*
|
|
2675
2806
|
* @param eventHandler An optional callback that will be called when there is
|
|
2676
2807
|
* an update to the status of the attachment fetch attempt.
|
|
2677
2808
|
*
|
|
2809
|
+
* @throws {Error} when called in a React Native environment.
|
|
2810
|
+
*
|
|
2678
2811
|
* @return An `AttachmentFetcher` object, which must be kept alive for the
|
|
2679
2812
|
* fetch request to proceed and for you to be notified about the attachment's
|
|
2680
2813
|
* fetch status changes.
|
|
@@ -2785,6 +2918,8 @@ interface CollectionsEventParams {
|
|
|
2785
2918
|
* the collections that were previously known about in the previous event, along
|
|
2786
2919
|
* with information about what collections have been inserted, deleted, updated,
|
|
2787
2920
|
* or moved since the last event.
|
|
2921
|
+
*
|
|
2922
|
+
* Not available in React Native environments.
|
|
2788
2923
|
*/
|
|
2789
2924
|
declare class CollectionsEvent {
|
|
2790
2925
|
/**
|
|
@@ -2851,6 +2986,8 @@ type CollectionsObservationHandler = (event: CollectionsEvent, signalNext?: () =
|
|
|
2851
2986
|
* A subscription, established by calling {@link subscribe | subscribe()}, will
|
|
2852
2987
|
* act as a signal to other peers that the device connects to that you would
|
|
2853
2988
|
* like to receive updates from them about the collections that they know about.
|
|
2989
|
+
*
|
|
2990
|
+
* Not available in React Native environments.
|
|
2854
2991
|
*/
|
|
2855
2992
|
declare class PendingCollectionsOperation implements PromiseLike<Collection[]> {
|
|
2856
2993
|
/**
|
|
@@ -2862,6 +2999,8 @@ declare class PendingCollectionsOperation implements PromiseLike<Collection[]> {
|
|
|
2862
2999
|
* @param direction Specify whether you want the sorting order to be
|
|
2863
3000
|
* `Ascending` or `Descending`.
|
|
2864
3001
|
*
|
|
3002
|
+
* @throws {Error} when called in a React Native environment.
|
|
3003
|
+
*
|
|
2865
3004
|
* @return A {@link PendingCollectionsOperation} that you can chain further
|
|
2866
3005
|
* function calls to.
|
|
2867
3006
|
*/
|
|
@@ -2877,6 +3016,8 @@ declare class PendingCollectionsOperation implements PromiseLike<Collection[]> {
|
|
|
2877
3016
|
* @param offset The number of collections that you want the eventual
|
|
2878
3017
|
* resulting set of collections to be offset by (and thus not include).
|
|
2879
3018
|
*
|
|
3019
|
+
* @throws {Error} when called in a React Native environment.
|
|
3020
|
+
*
|
|
2880
3021
|
* @return A {@link PendingCollectionsOperation} that you can chain further
|
|
2881
3022
|
* function calls to.
|
|
2882
3023
|
*/
|
|
@@ -2886,6 +3027,8 @@ declare class PendingCollectionsOperation implements PromiseLike<Collection[]> {
|
|
|
2886
3027
|
*
|
|
2887
3028
|
* @param limit The maximum number of collections that will be returned.
|
|
2888
3029
|
*
|
|
3030
|
+
* @throws {Error} when called in a React Native environment.
|
|
3031
|
+
*
|
|
2889
3032
|
* @return A {@link PendingCollectionsOperation} that you can chain further
|
|
2890
3033
|
* function calls to.
|
|
2891
3034
|
*/
|
|
@@ -2897,6 +3040,8 @@ declare class PendingCollectionsOperation implements PromiseLike<Collection[]> {
|
|
|
2897
3040
|
* The returned {@link Subscription} object must be kept in scope for as long
|
|
2898
3041
|
* as you want to keep receiving updates.
|
|
2899
3042
|
*
|
|
3043
|
+
* @throws {Error} when called in a React Native environment.
|
|
3044
|
+
*
|
|
2900
3045
|
* @return A {@link Subscription} object that must be kept in scope for as
|
|
2901
3046
|
* long as you want to keep receiving updates from other devices about the
|
|
2902
3047
|
* collections that they know about.
|
|
@@ -2917,6 +3062,8 @@ declare class PendingCollectionsOperation implements PromiseLike<Collection[]> {
|
|
|
2917
3062
|
* @param handler A closure that will be called every time there is an update
|
|
2918
3063
|
* about the list of known about collections.
|
|
2919
3064
|
*
|
|
3065
|
+
* @throws {Error} when called in a React Native environment.
|
|
3066
|
+
*
|
|
2920
3067
|
* @return A {@link LiveQuery} object that must be kept in scope for as long
|
|
2921
3068
|
* as you want to keep receiving updates.
|
|
2922
3069
|
*/
|
|
@@ -2936,6 +3083,8 @@ declare class PendingCollectionsOperation implements PromiseLike<Collection[]> {
|
|
|
2936
3083
|
* @param handler A closure that will be called every time there is an update
|
|
2937
3084
|
* about the list of known about collections.
|
|
2938
3085
|
*
|
|
3086
|
+
* @throws {Error} when called in a React Native environment.
|
|
3087
|
+
*
|
|
2939
3088
|
* @return A {@link LiveQuery} object that must be kept in scope for as long
|
|
2940
3089
|
* as you want to keep receiving updates.
|
|
2941
3090
|
*/
|
|
@@ -2944,6 +3093,8 @@ declare class PendingCollectionsOperation implements PromiseLike<Collection[]> {
|
|
|
2944
3093
|
* Return the list of collections requested based on the preceding function
|
|
2945
3094
|
* chaining.
|
|
2946
3095
|
*
|
|
3096
|
+
* @throws {Error} when called in a React Native environment.
|
|
3097
|
+
*
|
|
2947
3098
|
* @return A list of {@link Collection}s based on the preceding function
|
|
2948
3099
|
* chaining.
|
|
2949
3100
|
*/
|
|
@@ -2972,6 +3123,8 @@ declare class PendingCollectionsOperation implements PromiseLike<Collection[]> {
|
|
|
2972
3123
|
* or evicting any matching documents.
|
|
2973
3124
|
*
|
|
2974
3125
|
* Live queries and subscriptions are only available outside of transactions.
|
|
3126
|
+
*
|
|
3127
|
+
* Not available in React Native environments.
|
|
2975
3128
|
*/
|
|
2976
3129
|
declare class WriteTransactionPendingCursorOperation extends BasePendingCursorOperation {
|
|
2977
3130
|
sort(propertyPath: string, direction?: SortDirection): WriteTransactionPendingCursorOperation;
|
|
@@ -3002,6 +3155,8 @@ declare class WriteTransactionPendingIDSpecificOperation extends BasePendingIDSp
|
|
|
3002
3155
|
*
|
|
3003
3156
|
* Create a `WriteTransactionCollection` by starting a {@link WriteTransaction}
|
|
3004
3157
|
* and using its `scoped` method.
|
|
3158
|
+
*
|
|
3159
|
+
* Not available in React Native environments.
|
|
3005
3160
|
*/
|
|
3006
3161
|
declare class WriteTransactionCollection implements CollectionInterface {
|
|
3007
3162
|
/** The name of the collection. */
|
|
@@ -3025,11 +3180,14 @@ declare class WriteTransactionCollection implements CollectionInterface {
|
|
|
3025
3180
|
* @param query The query to run against the collection.
|
|
3026
3181
|
* @param queryArgs These arguments replace placeholders in the provided
|
|
3027
3182
|
* query.
|
|
3183
|
+
* @throws {Error} when called in a React Native environment.
|
|
3028
3184
|
*/
|
|
3029
3185
|
find(query: string, queryArgs?: QueryArguments | undefined): WriteTransactionPendingCursorOperation;
|
|
3030
3186
|
/**
|
|
3031
3187
|
* Convenience method, equivalent to calling {@link find | find()} and passing
|
|
3032
3188
|
* the query `"true"`.
|
|
3189
|
+
*
|
|
3190
|
+
* @throws {Error} when called in a React Native environment.
|
|
3033
3191
|
*/
|
|
3034
3192
|
findAll(): WriteTransactionPendingCursorOperation;
|
|
3035
3193
|
/**
|
|
@@ -3039,6 +3197,7 @@ declare class WriteTransactionCollection implements CollectionInterface {
|
|
|
3039
3197
|
* The returned object can be used to find and return the document. It can also be used to update, remove or evict the document.
|
|
3040
3198
|
*
|
|
3041
3199
|
* @param id The ID of the document to find.
|
|
3200
|
+
* @throws {Error} when called in a React Native environment.
|
|
3042
3201
|
*/
|
|
3043
3202
|
findByID(id: any): WriteTransactionPendingIDSpecificOperation;
|
|
3044
3203
|
upsert(value: DocumentValue, options?: UpsertOptions): Promise<DocumentID>;
|
|
@@ -3068,6 +3227,8 @@ declare class WriteTransactionCollection implements CollectionInterface {
|
|
|
3068
3227
|
*
|
|
3069
3228
|
* Please note that an `upsert` operation always results in the result type
|
|
3070
3229
|
* `inserted`, regardless of whether it resulted in an update or insert.
|
|
3230
|
+
*
|
|
3231
|
+
* Not available in React Native environments.
|
|
3071
3232
|
*/
|
|
3072
3233
|
interface WriteTransactionResult {
|
|
3073
3234
|
type: 'inserted' | 'removed' | 'evicted' | 'updated';
|
|
@@ -3088,6 +3249,8 @@ declare class WriteTransaction {
|
|
|
3088
3249
|
* provided to this function. You can create many
|
|
3089
3250
|
* {@link WriteTransactionCollection | collection} objects per
|
|
3090
3251
|
* {@link WriteTransaction} object.
|
|
3252
|
+
*
|
|
3253
|
+
* @throws {Error} when called in a React Native environment.
|
|
3091
3254
|
* */
|
|
3092
3255
|
scoped(toCollectionNamed: string): WriteTransactionCollection;
|
|
3093
3256
|
/** @internal */
|
|
@@ -3226,6 +3389,8 @@ declare class Store {
|
|
|
3226
3389
|
* * it is not empty
|
|
3227
3390
|
* * it does not contain the char '\0'
|
|
3228
3391
|
* * it does not begin with "$TS_"
|
|
3392
|
+
*
|
|
3393
|
+
* @throws {Error} when called in a React Native environment.
|
|
3229
3394
|
*/
|
|
3230
3395
|
collection(name: string): Collection;
|
|
3231
3396
|
/**
|
|
@@ -3234,11 +3399,15 @@ declare class Store {
|
|
|
3234
3399
|
*
|
|
3235
3400
|
* @return A {@link PendingCollectionsOperation} object that you can use to
|
|
3236
3401
|
* fetch or observe the collections in the store
|
|
3402
|
+
*
|
|
3403
|
+
* @throws {Error} when called in a React Native environment.
|
|
3237
3404
|
*/
|
|
3238
3405
|
collections(): PendingCollectionsOperation;
|
|
3239
3406
|
/**
|
|
3240
3407
|
* Returns the names of all available collections in the store of the
|
|
3241
3408
|
* related {@link Ditto} instance.
|
|
3409
|
+
*
|
|
3410
|
+
* @throws {Error} when called in a React Native environment.
|
|
3242
3411
|
*/
|
|
3243
3412
|
collectionNames(): Promise<string[]>;
|
|
3244
3413
|
/**
|
|
@@ -3273,6 +3442,7 @@ declare class Store {
|
|
|
3273
3442
|
* Allows you to group multiple operations together that affect multiple documents, potentially across multiple collections.
|
|
3274
3443
|
*
|
|
3275
3444
|
* @param callback is given access to a {@link WriteTransaction | write transaction object} that can be used to perform operations on the store.
|
|
3445
|
+
* @throws {Error} when called in a React Native environment.
|
|
3276
3446
|
* @returns a list of `WriteTransactionResult`s. There is a result for each operation performed as part of the write transaction.
|
|
3277
3447
|
*/
|
|
3278
3448
|
write(callback: (transaction: WriteTransaction) => Promise<void>): Promise<WriteTransactionResult[]>;
|
|
@@ -3677,7 +3847,7 @@ declare class Sync {
|
|
|
3677
3847
|
*/
|
|
3678
3848
|
readonly ditto: Ditto;
|
|
3679
3849
|
/**
|
|
3680
|
-
* All currently active sync subscriptions.
|
|
3850
|
+
* All currently active {@link SyncSubscription | sync subscriptions}.
|
|
3681
3851
|
*
|
|
3682
3852
|
* **Note:** Manage sync subscriptions using
|
|
3683
3853
|
* {@link registerSubscription | registerSubscription()} to register a new
|
|
@@ -4004,7 +4174,7 @@ declare class Ditto {
|
|
|
4004
4174
|
* disables this behavior, thus allowing the use of an interactive debugger
|
|
4005
4175
|
* without triggering the deadlock detection.
|
|
4006
4176
|
*
|
|
4007
|
-
* This feature is
|
|
4177
|
+
* This feature is only available in Node.js environments.
|
|
4008
4178
|
*/
|
|
4009
4179
|
static disableDeadlockDetection(): void;
|
|
4010
4180
|
/**
|
|
@@ -4014,8 +4184,8 @@ declare class Ditto {
|
|
|
4014
4184
|
* {@link Ditto.disableDeadlockDetection | Ditto.disableDeadlockDetection()}
|
|
4015
4185
|
* for more information.
|
|
4016
4186
|
*
|
|
4017
|
-
*
|
|
4018
|
-
* is
|
|
4187
|
+
* When called outside of a Node.js environment, this method always returns
|
|
4188
|
+
* `false` as deadlock detection is only available in Node.js.
|
|
4019
4189
|
*
|
|
4020
4190
|
* @returns `true` if deadlock detection is enabled
|
|
4021
4191
|
*/
|
|
@@ -4174,7 +4344,8 @@ declare class Ditto {
|
|
|
4174
4344
|
* This improves performance of initial sync when this peer has never before
|
|
4175
4345
|
* connected to a Ditto mesh for which sync with v3 peers is disabled.
|
|
4176
4346
|
*
|
|
4177
|
-
* @throws {Error}
|
|
4347
|
+
* @throws {Error} when called in a React Native environment where sync with v3
|
|
4348
|
+
* is always disabled.
|
|
4178
4349
|
*/
|
|
4179
4350
|
disableSyncWithV3(): Promise<void>;
|
|
4180
4351
|
/**
|
|
@@ -4484,7 +4655,7 @@ declare class Logger {
|
|
|
4484
4655
|
* callbacks.
|
|
4485
4656
|
*
|
|
4486
4657
|
* @throws {TypeError} if `callback` is not a function or `undefined`.
|
|
4487
|
-
* @throws {Error}
|
|
4658
|
+
* @throws {Error} when called in a React Native environment.
|
|
4488
4659
|
*/
|
|
4489
4660
|
static setCustomLogCallback(callback?: CustomLogCallback): Promise<void>;
|
|
4490
4661
|
/**
|