@firebase/database 1.0.9 → 1.0.10
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/dist/index.cjs.js +13834 -13834
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +13834 -13834
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +13849 -13849
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +13797 -13797
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +13849 -13849
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/api/Database.d.ts +137 -137
- package/dist/node-esm/src/api/OnDisconnect.d.ts +110 -110
- package/dist/node-esm/src/api/Reference.d.ts +122 -122
- package/dist/node-esm/src/api/Reference_impl.d.ts +1098 -1098
- package/dist/node-esm/src/api/ServerValue.d.ts +30 -30
- package/dist/node-esm/src/api/Transaction.d.ts +83 -83
- package/dist/node-esm/src/api/test_access.d.ts +31 -31
- package/dist/node-esm/src/api.d.ts +18 -18
- package/dist/node-esm/src/api.standalone.d.ts +30 -30
- package/dist/node-esm/src/core/AppCheckTokenProvider.d.ts +30 -30
- package/dist/node-esm/src/core/AuthTokenProvider.d.ts +49 -49
- package/dist/node-esm/src/core/CompoundWrite.d.ts +81 -81
- package/dist/node-esm/src/core/PersistentConnection.d.ts +135 -135
- package/dist/node-esm/src/core/ReadonlyRestClient.d.ts +60 -60
- package/dist/node-esm/src/core/Repo.d.ts +144 -144
- package/dist/node-esm/src/core/RepoInfo.d.ts +56 -56
- package/dist/node-esm/src/core/ServerActions.d.ts +52 -52
- package/dist/node-esm/src/core/SnapshotHolder.d.ts +26 -26
- package/dist/node-esm/src/core/SparseSnapshotTree.d.ts +64 -64
- package/dist/node-esm/src/core/SyncPoint.d.ts +91 -91
- package/dist/node-esm/src/core/SyncTree.d.ts +166 -166
- package/dist/node-esm/src/core/WriteTree.d.ts +205 -205
- package/dist/node-esm/src/core/operation/AckUserWrite.d.ts +36 -36
- package/dist/node-esm/src/core/operation/ListenComplete.d.ts +26 -26
- package/dist/node-esm/src/core/operation/Merge.d.ts +33 -33
- package/dist/node-esm/src/core/operation/Operation.d.ts +45 -45
- package/dist/node-esm/src/core/operation/Overwrite.d.ts +28 -28
- package/dist/node-esm/src/core/snap/ChildrenNode.d.ts +112 -112
- package/dist/node-esm/src/core/snap/IndexMap.d.ts +43 -43
- package/dist/node-esm/src/core/snap/LeafNode.d.ts +83 -83
- package/dist/node-esm/src/core/snap/Node.d.ts +126 -126
- package/dist/node-esm/src/core/snap/childSet.d.ts +32 -32
- package/dist/node-esm/src/core/snap/comparators.d.ts +19 -19
- package/dist/node-esm/src/core/snap/indexes/Index.d.ts +50 -50
- package/dist/node-esm/src/core/snap/indexes/KeyIndex.d.ts +34 -34
- package/dist/node-esm/src/core/snap/indexes/PathIndex.d.ts +29 -29
- package/dist/node-esm/src/core/snap/indexes/PriorityIndex.d.ts +33 -33
- package/dist/node-esm/src/core/snap/indexes/ValueIndex.d.ts +31 -31
- package/dist/node-esm/src/core/snap/nodeFromJSON.d.ts +24 -24
- package/dist/node-esm/src/core/snap/snap.d.ts +23 -23
- package/dist/node-esm/src/core/stats/StatsCollection.d.ts +26 -26
- package/dist/node-esm/src/core/stats/StatsListener.d.ts +30 -30
- package/dist/node-esm/src/core/stats/StatsManager.d.ts +20 -20
- package/dist/node-esm/src/core/stats/StatsReporter.d.ts +28 -28
- package/dist/node-esm/src/core/storage/DOMStorageWrapper.d.ts +46 -46
- package/dist/node-esm/src/core/storage/MemoryStorage.d.ts +27 -27
- package/dist/node-esm/src/core/storage/storage.d.ts +22 -22
- package/dist/node-esm/src/core/util/EventEmitter.d.ts +39 -39
- package/dist/node-esm/src/core/util/ImmutableTree.d.ts +117 -117
- package/dist/node-esm/src/core/util/NextPushId.d.ts +33 -33
- package/dist/node-esm/src/core/util/OnlineMonitor.d.ts +31 -31
- package/dist/node-esm/src/core/util/Path.d.ts +94 -94
- package/dist/node-esm/src/core/util/ServerValues.d.ts +56 -56
- package/dist/node-esm/src/core/util/SortedMap.d.ts +324 -324
- package/dist/node-esm/src/core/util/Tree.d.ts +105 -105
- package/dist/node-esm/src/core/util/VisibilityMonitor.d.ts +23 -23
- package/dist/node-esm/src/core/util/libs/parser.d.ts +32 -32
- package/dist/node-esm/src/core/util/misc.d.ts +19 -19
- package/dist/node-esm/src/core/util/util.d.ts +176 -176
- package/dist/node-esm/src/core/util/validation.d.ts +70 -70
- package/dist/node-esm/src/core/version.d.ts +23 -23
- package/dist/node-esm/src/core/view/CacheNode.d.ts +41 -41
- package/dist/node-esm/src/core/view/Change.d.ts +46 -46
- package/dist/node-esm/src/core/view/ChildChangeAccumulator.d.ts +22 -22
- package/dist/node-esm/src/core/view/CompleteChildSource.d.ts +55 -55
- package/dist/node-esm/src/core/view/Event.d.ts +64 -64
- package/dist/node-esm/src/core/view/EventGenerator.d.ts +42 -42
- package/dist/node-esm/src/core/view/EventQueue.d.ts +67 -67
- package/dist/node-esm/src/core/view/EventRegistration.d.ts +87 -87
- package/dist/node-esm/src/core/view/QueryParams.d.ts +95 -95
- package/dist/node-esm/src/core/view/View.d.ts +59 -59
- package/dist/node-esm/src/core/view/ViewCache.d.ts +32 -32
- package/dist/node-esm/src/core/view/ViewProcessor.d.ts +32 -32
- package/dist/node-esm/src/core/view/filter/IndexedFilter.d.ts +35 -35
- package/dist/node-esm/src/core/view/filter/LimitedFilter.d.ts +47 -47
- package/dist/node-esm/src/core/view/filter/NodeFilter.d.ts +54 -54
- package/dist/node-esm/src/core/view/filter/RangedFilter.d.ts +47 -47
- package/dist/node-esm/src/index.d.ts +28 -28
- package/dist/node-esm/src/index.node.d.ts +17 -17
- package/dist/node-esm/src/index.standalone.d.ts +17 -17
- package/dist/node-esm/src/internal/index.d.ts +38 -38
- package/dist/node-esm/src/realtime/BrowserPollConnection.d.ts +198 -198
- package/dist/node-esm/src/realtime/Connection.d.ts +102 -102
- package/dist/node-esm/src/realtime/Constants.d.ts +27 -27
- package/dist/node-esm/src/realtime/Transport.d.ts +58 -58
- package/dist/node-esm/src/realtime/TransportManager.d.ts +50 -50
- package/dist/node-esm/src/realtime/WebSocketConnection.d.ts +127 -127
- package/dist/node-esm/src/realtime/polling/PacketReceiver.d.ts +38 -38
- package/dist/node-esm/src/register.d.ts +1 -1
- package/dist/node-esm/test/compound_write.test.d.ts +17 -17
- package/dist/node-esm/test/connection.test.d.ts +17 -17
- package/dist/node-esm/test/deno.test.d.ts +17 -17
- package/dist/node-esm/test/exp/integration.test.d.ts +17 -17
- package/dist/node-esm/test/helpers/EventAccumulator.d.ts +35 -35
- package/dist/node-esm/test/helpers/syncpoint-util.d.ts +29 -29
- package/dist/node-esm/test/helpers/util.d.ts +34 -34
- package/dist/node-esm/test/node.test.d.ts +17 -17
- package/dist/node-esm/test/parser.test.d.ts +17 -17
- package/dist/node-esm/test/path.test.d.ts +17 -17
- package/dist/node-esm/test/pushid.test.d.ts +17 -17
- package/dist/node-esm/test/queryconstraint.test.d.ts +17 -17
- package/dist/node-esm/test/repoinfo.test.d.ts +17 -17
- package/dist/node-esm/test/sortedmap.test.d.ts +17 -17
- package/dist/node-esm/test/sparsesnapshottree.test.d.ts +17 -17
- package/dist/node-esm/test/syncpoint.test.d.ts +17 -17
- package/dist/node-esm/test/transport.test.d.ts +17 -17
- package/dist/node-esm/test/websocketconnection.test.d.ts +17 -17
- package/dist/src/api/Database.d.ts +137 -137
- package/dist/src/api/OnDisconnect.d.ts +110 -110
- package/dist/src/api/Reference.d.ts +122 -122
- package/dist/src/api/Reference_impl.d.ts +1098 -1098
- package/dist/src/api/ServerValue.d.ts +30 -30
- package/dist/src/api/Transaction.d.ts +83 -83
- package/dist/src/api/test_access.d.ts +31 -31
- package/dist/src/api.d.ts +18 -18
- package/dist/src/api.standalone.d.ts +30 -30
- package/dist/src/core/AppCheckTokenProvider.d.ts +30 -30
- package/dist/src/core/AuthTokenProvider.d.ts +49 -49
- package/dist/src/core/CompoundWrite.d.ts +81 -81
- package/dist/src/core/PersistentConnection.d.ts +135 -135
- package/dist/src/core/ReadonlyRestClient.d.ts +60 -60
- package/dist/src/core/Repo.d.ts +144 -144
- package/dist/src/core/RepoInfo.d.ts +56 -56
- package/dist/src/core/ServerActions.d.ts +52 -52
- package/dist/src/core/SnapshotHolder.d.ts +26 -26
- package/dist/src/core/SparseSnapshotTree.d.ts +64 -64
- package/dist/src/core/SyncPoint.d.ts +91 -91
- package/dist/src/core/SyncTree.d.ts +166 -166
- package/dist/src/core/WriteTree.d.ts +205 -205
- package/dist/src/core/operation/AckUserWrite.d.ts +36 -36
- package/dist/src/core/operation/ListenComplete.d.ts +26 -26
- package/dist/src/core/operation/Merge.d.ts +33 -33
- package/dist/src/core/operation/Operation.d.ts +45 -45
- package/dist/src/core/operation/Overwrite.d.ts +28 -28
- package/dist/src/core/snap/ChildrenNode.d.ts +112 -112
- package/dist/src/core/snap/IndexMap.d.ts +43 -43
- package/dist/src/core/snap/LeafNode.d.ts +83 -83
- package/dist/src/core/snap/Node.d.ts +126 -126
- package/dist/src/core/snap/childSet.d.ts +32 -32
- package/dist/src/core/snap/comparators.d.ts +19 -19
- package/dist/src/core/snap/indexes/Index.d.ts +50 -50
- package/dist/src/core/snap/indexes/KeyIndex.d.ts +34 -34
- package/dist/src/core/snap/indexes/PathIndex.d.ts +29 -29
- package/dist/src/core/snap/indexes/PriorityIndex.d.ts +33 -33
- package/dist/src/core/snap/indexes/ValueIndex.d.ts +31 -31
- package/dist/src/core/snap/nodeFromJSON.d.ts +24 -24
- package/dist/src/core/snap/snap.d.ts +23 -23
- package/dist/src/core/stats/StatsCollection.d.ts +26 -26
- package/dist/src/core/stats/StatsListener.d.ts +30 -30
- package/dist/src/core/stats/StatsManager.d.ts +20 -20
- package/dist/src/core/stats/StatsReporter.d.ts +28 -28
- package/dist/src/core/storage/DOMStorageWrapper.d.ts +46 -46
- package/dist/src/core/storage/MemoryStorage.d.ts +27 -27
- package/dist/src/core/storage/storage.d.ts +22 -22
- package/dist/src/core/util/EventEmitter.d.ts +39 -39
- package/dist/src/core/util/ImmutableTree.d.ts +117 -117
- package/dist/src/core/util/NextPushId.d.ts +33 -33
- package/dist/src/core/util/OnlineMonitor.d.ts +31 -31
- package/dist/src/core/util/Path.d.ts +94 -94
- package/dist/src/core/util/ServerValues.d.ts +56 -56
- package/dist/src/core/util/SortedMap.d.ts +324 -324
- package/dist/src/core/util/Tree.d.ts +105 -105
- package/dist/src/core/util/VisibilityMonitor.d.ts +23 -23
- package/dist/src/core/util/libs/parser.d.ts +32 -32
- package/dist/src/core/util/misc.d.ts +19 -19
- package/dist/src/core/util/util.d.ts +176 -176
- package/dist/src/core/util/validation.d.ts +70 -70
- package/dist/src/core/version.d.ts +23 -23
- package/dist/src/core/view/CacheNode.d.ts +41 -41
- package/dist/src/core/view/Change.d.ts +46 -46
- package/dist/src/core/view/ChildChangeAccumulator.d.ts +22 -22
- package/dist/src/core/view/CompleteChildSource.d.ts +55 -55
- package/dist/src/core/view/Event.d.ts +64 -64
- package/dist/src/core/view/EventGenerator.d.ts +42 -42
- package/dist/src/core/view/EventQueue.d.ts +67 -67
- package/dist/src/core/view/EventRegistration.d.ts +87 -87
- package/dist/src/core/view/QueryParams.d.ts +95 -95
- package/dist/src/core/view/View.d.ts +59 -59
- package/dist/src/core/view/ViewCache.d.ts +32 -32
- package/dist/src/core/view/ViewProcessor.d.ts +32 -32
- package/dist/src/core/view/filter/IndexedFilter.d.ts +35 -35
- package/dist/src/core/view/filter/LimitedFilter.d.ts +47 -47
- package/dist/src/core/view/filter/NodeFilter.d.ts +54 -54
- package/dist/src/core/view/filter/RangedFilter.d.ts +47 -47
- package/dist/src/index.d.ts +28 -28
- package/dist/src/index.node.d.ts +17 -17
- package/dist/src/index.standalone.d.ts +17 -17
- package/dist/src/internal/index.d.ts +38 -38
- package/dist/src/realtime/BrowserPollConnection.d.ts +198 -198
- package/dist/src/realtime/Connection.d.ts +102 -102
- package/dist/src/realtime/Constants.d.ts +27 -27
- package/dist/src/realtime/Transport.d.ts +58 -58
- package/dist/src/realtime/TransportManager.d.ts +50 -50
- package/dist/src/realtime/WebSocketConnection.d.ts +127 -127
- package/dist/src/realtime/polling/PacketReceiver.d.ts +38 -38
- package/dist/src/register.d.ts +1 -1
- package/dist/test/compound_write.test.d.ts +17 -17
- package/dist/test/connection.test.d.ts +17 -17
- package/dist/test/deno.test.d.ts +17 -17
- package/dist/test/exp/integration.test.d.ts +17 -17
- package/dist/test/helpers/EventAccumulator.d.ts +35 -35
- package/dist/test/helpers/syncpoint-util.d.ts +29 -29
- package/dist/test/helpers/util.d.ts +34 -34
- package/dist/test/node.test.d.ts +17 -17
- package/dist/test/parser.test.d.ts +17 -17
- package/dist/test/path.test.d.ts +17 -17
- package/dist/test/pushid.test.d.ts +17 -17
- package/dist/test/queryconstraint.test.d.ts +17 -17
- package/dist/test/repoinfo.test.d.ts +17 -17
- package/dist/test/sortedmap.test.d.ts +17 -17
- package/dist/test/sparsesnapshottree.test.d.ts +17 -17
- package/dist/test/syncpoint.test.d.ts +17 -17
- package/dist/test/transport.test.d.ts +17 -17
- package/dist/test/websocketconnection.test.d.ts +17 -17
- package/package.json +8 -8
|
@@ -1,176 +1,176 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { QueryContext } from '../view/EventRegistration';
|
|
18
|
-
/**
|
|
19
|
-
* Returns a locally-unique ID (generated by just incrementing up from 0 each time its called).
|
|
20
|
-
*/
|
|
21
|
-
export declare const LUIDGenerator: () => number;
|
|
22
|
-
/**
|
|
23
|
-
* Sha1 hash of the input string
|
|
24
|
-
* @param str - The string to hash
|
|
25
|
-
* @returns {!string} The resulting hash
|
|
26
|
-
*/
|
|
27
|
-
export declare const sha1: (str: string) => string;
|
|
28
|
-
/**
|
|
29
|
-
* Use this for all debug messages in Firebase.
|
|
30
|
-
*/
|
|
31
|
-
export declare let logger: ((a: string) => void) | null;
|
|
32
|
-
/**
|
|
33
|
-
* The implementation of Firebase.enableLogging (defined here to break dependencies)
|
|
34
|
-
* @param logger_ - A flag to turn on logging, or a custom logger
|
|
35
|
-
* @param persistent - Whether or not to persist logging settings across refreshes
|
|
36
|
-
*/
|
|
37
|
-
export declare const enableLogging: (logger_?: boolean | ((a: string) => void), persistent?: boolean) => void;
|
|
38
|
-
export declare const log: (...varArgs: unknown[]) => void;
|
|
39
|
-
export declare const logWrapper: (prefix: string) => (...varArgs: unknown[]) => void;
|
|
40
|
-
export declare const error: (...varArgs: string[]) => void;
|
|
41
|
-
export declare const fatal: (...varArgs: string[]) => never;
|
|
42
|
-
export declare const warn: (...varArgs: unknown[]) => void;
|
|
43
|
-
/**
|
|
44
|
-
* Logs a warning if the containing page uses https. Called when a call to new Firebase
|
|
45
|
-
* does not use https.
|
|
46
|
-
*/
|
|
47
|
-
export declare const warnIfPageIsSecure: () => void;
|
|
48
|
-
export declare const warnAboutUnsupportedMethod: (methodName: string) => void;
|
|
49
|
-
/**
|
|
50
|
-
* Returns true if data is NaN, or +/- Infinity.
|
|
51
|
-
*/
|
|
52
|
-
export declare const isInvalidJSONNumber: (data: unknown) => boolean;
|
|
53
|
-
export declare const executeWhenDOMReady: (fn: () => void) => void;
|
|
54
|
-
/**
|
|
55
|
-
* Minimum key name. Invalid for actual data, used as a marker to sort before any valid names
|
|
56
|
-
*/
|
|
57
|
-
export declare const MIN_NAME = "[MIN_NAME]";
|
|
58
|
-
/**
|
|
59
|
-
* Maximum key name. Invalid for actual data, used as a marker to sort above any valid names
|
|
60
|
-
*/
|
|
61
|
-
export declare const MAX_NAME = "[MAX_NAME]";
|
|
62
|
-
/**
|
|
63
|
-
* Compares valid Firebase key names, plus min and max name
|
|
64
|
-
*/
|
|
65
|
-
export declare const nameCompare: (a: string, b: string) => number;
|
|
66
|
-
/**
|
|
67
|
-
* @returns {!number} comparison result.
|
|
68
|
-
*/
|
|
69
|
-
export declare const stringCompare: (a: string, b: string) => number;
|
|
70
|
-
export declare const requireKey: (key: string, obj: {
|
|
71
|
-
[k: string]: unknown;
|
|
72
|
-
}) => unknown;
|
|
73
|
-
export declare const ObjectToUniqueKey: (obj: unknown) => string;
|
|
74
|
-
/**
|
|
75
|
-
* Splits a string into a number of smaller segments of maximum size
|
|
76
|
-
* @param str - The string
|
|
77
|
-
* @param segsize - The maximum number of chars in the string.
|
|
78
|
-
* @returns The string, split into appropriately-sized chunks
|
|
79
|
-
*/
|
|
80
|
-
export declare const splitStringBySize: (str: string, segsize: number) => string[];
|
|
81
|
-
/**
|
|
82
|
-
* Apply a function to each (key, value) pair in an object or
|
|
83
|
-
* apply a function to each (index, value) pair in an array
|
|
84
|
-
* @param obj - The object or array to iterate over
|
|
85
|
-
* @param fn - The function to apply
|
|
86
|
-
*/
|
|
87
|
-
export declare function each(obj: object, fn: (k: string, v: unknown) => void): void;
|
|
88
|
-
/**
|
|
89
|
-
* Like goog.bind, but doesn't bother to create a closure if opt_context is null/undefined.
|
|
90
|
-
* @param callback - Callback function.
|
|
91
|
-
* @param context - Optional context to bind to.
|
|
92
|
-
*
|
|
93
|
-
*/
|
|
94
|
-
export declare const bindCallback: (callback: (a: unknown) => void, context?: object | null) => (a: unknown) => void;
|
|
95
|
-
/**
|
|
96
|
-
* Borrowed from http://hg.secondlife.com/llsd/src/tip/js/typedarray.js (MIT License)
|
|
97
|
-
* I made one modification at the end and removed the NaN / Infinity
|
|
98
|
-
* handling (since it seemed broken [caused an overflow] and we don't need it). See MJL comments.
|
|
99
|
-
* @param v - A double
|
|
100
|
-
*
|
|
101
|
-
*/
|
|
102
|
-
export declare const doubleToIEEE754String: (v: number) => string;
|
|
103
|
-
/**
|
|
104
|
-
* Used to detect if we're in a Chrome content script (which executes in an
|
|
105
|
-
* isolated environment where long-polling doesn't work).
|
|
106
|
-
*/
|
|
107
|
-
export declare const isChromeExtensionContentScript: () => boolean;
|
|
108
|
-
/**
|
|
109
|
-
* Used to detect if we're in a Windows 8 Store app.
|
|
110
|
-
*/
|
|
111
|
-
export declare const isWindowsStoreApp: () => boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Converts a server error code to a JavaScript Error
|
|
114
|
-
*/
|
|
115
|
-
export declare function errorForServerCode(code: string, query: QueryContext): Error;
|
|
116
|
-
/**
|
|
117
|
-
* Used to test for integer-looking strings
|
|
118
|
-
*/
|
|
119
|
-
export declare const INTEGER_REGEXP_: RegExp;
|
|
120
|
-
/**
|
|
121
|
-
* For use in keys, the minimum possible 32-bit integer.
|
|
122
|
-
*/
|
|
123
|
-
export declare const INTEGER_32_MIN = -2147483648;
|
|
124
|
-
/**
|
|
125
|
-
* For use in keys, the maximum possible 32-bit integer.
|
|
126
|
-
*/
|
|
127
|
-
export declare const INTEGER_32_MAX = 2147483647;
|
|
128
|
-
/**
|
|
129
|
-
* If the string contains a 32-bit integer, return it. Else return null.
|
|
130
|
-
*/
|
|
131
|
-
export declare const tryParseInt: (str: string) => number | null;
|
|
132
|
-
/**
|
|
133
|
-
* Helper to run some code but catch any exceptions and re-throw them later.
|
|
134
|
-
* Useful for preventing user callbacks from breaking internal code.
|
|
135
|
-
*
|
|
136
|
-
* Re-throwing the exception from a setTimeout is a little evil, but it's very
|
|
137
|
-
* convenient (we don't have to try to figure out when is a safe point to
|
|
138
|
-
* re-throw it), and the behavior seems reasonable:
|
|
139
|
-
*
|
|
140
|
-
* * If you aren't pausing on exceptions, you get an error in the console with
|
|
141
|
-
* the correct stack trace.
|
|
142
|
-
* * If you're pausing on all exceptions, the debugger will pause on your
|
|
143
|
-
* exception and then again when we rethrow it.
|
|
144
|
-
* * If you're only pausing on uncaught exceptions, the debugger will only pause
|
|
145
|
-
* on us re-throwing it.
|
|
146
|
-
*
|
|
147
|
-
* @param fn - The code to guard.
|
|
148
|
-
*/
|
|
149
|
-
export declare const exceptionGuard: (fn: () => void) => void;
|
|
150
|
-
/**
|
|
151
|
-
* Helper function to safely call opt_callback with the specified arguments. It:
|
|
152
|
-
* 1. Turns into a no-op if opt_callback is null or undefined.
|
|
153
|
-
* 2. Wraps the call inside exceptionGuard to prevent exceptions from breaking our state.
|
|
154
|
-
*
|
|
155
|
-
* @param callback - Optional onComplete callback.
|
|
156
|
-
* @param varArgs - Arbitrary args to be passed to opt_onComplete
|
|
157
|
-
*/
|
|
158
|
-
export declare const callUserCallback: (callback?: Function | null, ...varArgs: unknown[]) => void;
|
|
159
|
-
/**
|
|
160
|
-
* @returns {boolean} true if we think we're currently being crawled.
|
|
161
|
-
*/
|
|
162
|
-
export declare const beingCrawled: () => boolean;
|
|
163
|
-
/**
|
|
164
|
-
* Export a property of an object using a getter function.
|
|
165
|
-
*/
|
|
166
|
-
export declare const exportPropGetter: (object: object, name: string, fnGet: () => unknown) => void;
|
|
167
|
-
/**
|
|
168
|
-
* Same as setTimeout() except on Node.JS it will /not/ prevent the process from exiting.
|
|
169
|
-
*
|
|
170
|
-
* It is removed with clearTimeout() as normal.
|
|
171
|
-
*
|
|
172
|
-
* @param fn - Function to run.
|
|
173
|
-
* @param time - Milliseconds to wait before running.
|
|
174
|
-
* @returns The setTimeout() return value.
|
|
175
|
-
*/
|
|
176
|
-
export declare const setTimeoutNonBlocking: (fn: () => void, time: number) => number | object;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { QueryContext } from '../view/EventRegistration';
|
|
18
|
+
/**
|
|
19
|
+
* Returns a locally-unique ID (generated by just incrementing up from 0 each time its called).
|
|
20
|
+
*/
|
|
21
|
+
export declare const LUIDGenerator: () => number;
|
|
22
|
+
/**
|
|
23
|
+
* Sha1 hash of the input string
|
|
24
|
+
* @param str - The string to hash
|
|
25
|
+
* @returns {!string} The resulting hash
|
|
26
|
+
*/
|
|
27
|
+
export declare const sha1: (str: string) => string;
|
|
28
|
+
/**
|
|
29
|
+
* Use this for all debug messages in Firebase.
|
|
30
|
+
*/
|
|
31
|
+
export declare let logger: ((a: string) => void) | null;
|
|
32
|
+
/**
|
|
33
|
+
* The implementation of Firebase.enableLogging (defined here to break dependencies)
|
|
34
|
+
* @param logger_ - A flag to turn on logging, or a custom logger
|
|
35
|
+
* @param persistent - Whether or not to persist logging settings across refreshes
|
|
36
|
+
*/
|
|
37
|
+
export declare const enableLogging: (logger_?: boolean | ((a: string) => void) | null, persistent?: boolean) => void;
|
|
38
|
+
export declare const log: (...varArgs: unknown[]) => void;
|
|
39
|
+
export declare const logWrapper: (prefix: string) => (...varArgs: unknown[]) => void;
|
|
40
|
+
export declare const error: (...varArgs: string[]) => void;
|
|
41
|
+
export declare const fatal: (...varArgs: string[]) => never;
|
|
42
|
+
export declare const warn: (...varArgs: unknown[]) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Logs a warning if the containing page uses https. Called when a call to new Firebase
|
|
45
|
+
* does not use https.
|
|
46
|
+
*/
|
|
47
|
+
export declare const warnIfPageIsSecure: () => void;
|
|
48
|
+
export declare const warnAboutUnsupportedMethod: (methodName: string) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Returns true if data is NaN, or +/- Infinity.
|
|
51
|
+
*/
|
|
52
|
+
export declare const isInvalidJSONNumber: (data: unknown) => boolean;
|
|
53
|
+
export declare const executeWhenDOMReady: (fn: () => void) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Minimum key name. Invalid for actual data, used as a marker to sort before any valid names
|
|
56
|
+
*/
|
|
57
|
+
export declare const MIN_NAME = "[MIN_NAME]";
|
|
58
|
+
/**
|
|
59
|
+
* Maximum key name. Invalid for actual data, used as a marker to sort above any valid names
|
|
60
|
+
*/
|
|
61
|
+
export declare const MAX_NAME = "[MAX_NAME]";
|
|
62
|
+
/**
|
|
63
|
+
* Compares valid Firebase key names, plus min and max name
|
|
64
|
+
*/
|
|
65
|
+
export declare const nameCompare: (a: string, b: string) => number;
|
|
66
|
+
/**
|
|
67
|
+
* @returns {!number} comparison result.
|
|
68
|
+
*/
|
|
69
|
+
export declare const stringCompare: (a: string, b: string) => number;
|
|
70
|
+
export declare const requireKey: (key: string, obj: {
|
|
71
|
+
[k: string]: unknown;
|
|
72
|
+
}) => unknown;
|
|
73
|
+
export declare const ObjectToUniqueKey: (obj: unknown) => string;
|
|
74
|
+
/**
|
|
75
|
+
* Splits a string into a number of smaller segments of maximum size
|
|
76
|
+
* @param str - The string
|
|
77
|
+
* @param segsize - The maximum number of chars in the string.
|
|
78
|
+
* @returns The string, split into appropriately-sized chunks
|
|
79
|
+
*/
|
|
80
|
+
export declare const splitStringBySize: (str: string, segsize: number) => string[];
|
|
81
|
+
/**
|
|
82
|
+
* Apply a function to each (key, value) pair in an object or
|
|
83
|
+
* apply a function to each (index, value) pair in an array
|
|
84
|
+
* @param obj - The object or array to iterate over
|
|
85
|
+
* @param fn - The function to apply
|
|
86
|
+
*/
|
|
87
|
+
export declare function each(obj: object, fn: (k: string, v: unknown) => void): void;
|
|
88
|
+
/**
|
|
89
|
+
* Like goog.bind, but doesn't bother to create a closure if opt_context is null/undefined.
|
|
90
|
+
* @param callback - Callback function.
|
|
91
|
+
* @param context - Optional context to bind to.
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
export declare const bindCallback: (callback: (a: unknown) => void, context?: object | null) => (a: unknown) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Borrowed from http://hg.secondlife.com/llsd/src/tip/js/typedarray.js (MIT License)
|
|
97
|
+
* I made one modification at the end and removed the NaN / Infinity
|
|
98
|
+
* handling (since it seemed broken [caused an overflow] and we don't need it). See MJL comments.
|
|
99
|
+
* @param v - A double
|
|
100
|
+
*
|
|
101
|
+
*/
|
|
102
|
+
export declare const doubleToIEEE754String: (v: number) => string;
|
|
103
|
+
/**
|
|
104
|
+
* Used to detect if we're in a Chrome content script (which executes in an
|
|
105
|
+
* isolated environment where long-polling doesn't work).
|
|
106
|
+
*/
|
|
107
|
+
export declare const isChromeExtensionContentScript: () => boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Used to detect if we're in a Windows 8 Store app.
|
|
110
|
+
*/
|
|
111
|
+
export declare const isWindowsStoreApp: () => boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Converts a server error code to a JavaScript Error
|
|
114
|
+
*/
|
|
115
|
+
export declare function errorForServerCode(code: string, query: QueryContext): Error;
|
|
116
|
+
/**
|
|
117
|
+
* Used to test for integer-looking strings
|
|
118
|
+
*/
|
|
119
|
+
export declare const INTEGER_REGEXP_: RegExp;
|
|
120
|
+
/**
|
|
121
|
+
* For use in keys, the minimum possible 32-bit integer.
|
|
122
|
+
*/
|
|
123
|
+
export declare const INTEGER_32_MIN = -2147483648;
|
|
124
|
+
/**
|
|
125
|
+
* For use in keys, the maximum possible 32-bit integer.
|
|
126
|
+
*/
|
|
127
|
+
export declare const INTEGER_32_MAX = 2147483647;
|
|
128
|
+
/**
|
|
129
|
+
* If the string contains a 32-bit integer, return it. Else return null.
|
|
130
|
+
*/
|
|
131
|
+
export declare const tryParseInt: (str: string) => number | null;
|
|
132
|
+
/**
|
|
133
|
+
* Helper to run some code but catch any exceptions and re-throw them later.
|
|
134
|
+
* Useful for preventing user callbacks from breaking internal code.
|
|
135
|
+
*
|
|
136
|
+
* Re-throwing the exception from a setTimeout is a little evil, but it's very
|
|
137
|
+
* convenient (we don't have to try to figure out when is a safe point to
|
|
138
|
+
* re-throw it), and the behavior seems reasonable:
|
|
139
|
+
*
|
|
140
|
+
* * If you aren't pausing on exceptions, you get an error in the console with
|
|
141
|
+
* the correct stack trace.
|
|
142
|
+
* * If you're pausing on all exceptions, the debugger will pause on your
|
|
143
|
+
* exception and then again when we rethrow it.
|
|
144
|
+
* * If you're only pausing on uncaught exceptions, the debugger will only pause
|
|
145
|
+
* on us re-throwing it.
|
|
146
|
+
*
|
|
147
|
+
* @param fn - The code to guard.
|
|
148
|
+
*/
|
|
149
|
+
export declare const exceptionGuard: (fn: () => void) => void;
|
|
150
|
+
/**
|
|
151
|
+
* Helper function to safely call opt_callback with the specified arguments. It:
|
|
152
|
+
* 1. Turns into a no-op if opt_callback is null or undefined.
|
|
153
|
+
* 2. Wraps the call inside exceptionGuard to prevent exceptions from breaking our state.
|
|
154
|
+
*
|
|
155
|
+
* @param callback - Optional onComplete callback.
|
|
156
|
+
* @param varArgs - Arbitrary args to be passed to opt_onComplete
|
|
157
|
+
*/
|
|
158
|
+
export declare const callUserCallback: (callback?: Function | null, ...varArgs: unknown[]) => void;
|
|
159
|
+
/**
|
|
160
|
+
* @returns {boolean} true if we think we're currently being crawled.
|
|
161
|
+
*/
|
|
162
|
+
export declare const beingCrawled: () => boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Export a property of an object using a getter function.
|
|
165
|
+
*/
|
|
166
|
+
export declare const exportPropGetter: (object: object, name: string, fnGet: () => unknown) => void;
|
|
167
|
+
/**
|
|
168
|
+
* Same as setTimeout() except on Node.JS it will /not/ prevent the process from exiting.
|
|
169
|
+
*
|
|
170
|
+
* It is removed with clearTimeout() as normal.
|
|
171
|
+
*
|
|
172
|
+
* @param fn - Function to run.
|
|
173
|
+
* @param time - Milliseconds to wait before running.
|
|
174
|
+
* @returns The setTimeout() return value.
|
|
175
|
+
*/
|
|
176
|
+
export declare const setTimeoutNonBlocking: (fn: () => void, time: number) => number | object;
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { RepoInfo } from '../RepoInfo';
|
|
18
|
-
import { Path, ValidationPath } from './Path';
|
|
19
|
-
/**
|
|
20
|
-
* True for invalid Firebase keys
|
|
21
|
-
*/
|
|
22
|
-
export declare const INVALID_KEY_REGEX_: RegExp;
|
|
23
|
-
/**
|
|
24
|
-
* True for invalid Firebase paths.
|
|
25
|
-
* Allows '/' in paths.
|
|
26
|
-
*/
|
|
27
|
-
export declare const INVALID_PATH_REGEX_: RegExp;
|
|
28
|
-
/**
|
|
29
|
-
* Maximum number of characters to allow in leaf value
|
|
30
|
-
*/
|
|
31
|
-
export declare const MAX_LEAF_SIZE_: number;
|
|
32
|
-
export declare const isValidKey: (key: unknown) => boolean;
|
|
33
|
-
export declare const isValidPathString: (pathString: string) => boolean;
|
|
34
|
-
export declare const isValidRootPathString: (pathString: string) => boolean;
|
|
35
|
-
export declare const isValidPriority: (priority: unknown) => boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Pre-validate a datum passed as an argument to Firebase function.
|
|
38
|
-
*/
|
|
39
|
-
export declare const validateFirebaseDataArg: (fnName: string, value: unknown, path: Path, optional: boolean) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Validate a data object client-side before sending to server.
|
|
42
|
-
*/
|
|
43
|
-
export declare const validateFirebaseData: (errorPrefix: string, data: unknown, path_: Path | ValidationPath) => void;
|
|
44
|
-
/**
|
|
45
|
-
* Pre-validate paths passed in the firebase function.
|
|
46
|
-
*/
|
|
47
|
-
export declare const validateFirebaseMergePaths: (errorPrefix: string, mergePaths: Path[]) => void;
|
|
48
|
-
/**
|
|
49
|
-
* pre-validate an object passed as an argument to firebase function (
|
|
50
|
-
* must be an object - e.g. for firebase.update()).
|
|
51
|
-
*/
|
|
52
|
-
export declare const validateFirebaseMergeDataArg: (fnName: string, data: unknown, path: Path, optional: boolean) => void;
|
|
53
|
-
export declare const validatePriority: (fnName: string, priority: unknown, optional: boolean) => void;
|
|
54
|
-
export declare const validateKey: (fnName: string, argumentName: string, key: string, optional: boolean) => void;
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
export declare const validatePathString: (fnName: string, argumentName: string, pathString: string, optional: boolean) => void;
|
|
59
|
-
export declare const validateRootPathString: (fnName: string, argumentName: string, pathString: string, optional: boolean) => void;
|
|
60
|
-
/**
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
export declare const validateWritablePath: (fnName: string, path: Path) => void;
|
|
64
|
-
export declare const validateUrl: (fnName: string, parsedUrl: {
|
|
65
|
-
repoInfo: RepoInfo;
|
|
66
|
-
path: Path;
|
|
67
|
-
}) => void;
|
|
68
|
-
export declare const validateString: (fnName: string, argumentName: string, string: unknown, optional: boolean) => void;
|
|
69
|
-
export declare const validateObject: (fnName: string, argumentName: string, obj: unknown, optional: boolean) => void;
|
|
70
|
-
export declare const validateObjectContainsKey: (fnName: string, argumentName: string, obj: unknown, key: string, optional: boolean, optType?: string) => void;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { RepoInfo } from '../RepoInfo';
|
|
18
|
+
import { Path, ValidationPath } from './Path';
|
|
19
|
+
/**
|
|
20
|
+
* True for invalid Firebase keys
|
|
21
|
+
*/
|
|
22
|
+
export declare const INVALID_KEY_REGEX_: RegExp;
|
|
23
|
+
/**
|
|
24
|
+
* True for invalid Firebase paths.
|
|
25
|
+
* Allows '/' in paths.
|
|
26
|
+
*/
|
|
27
|
+
export declare const INVALID_PATH_REGEX_: RegExp;
|
|
28
|
+
/**
|
|
29
|
+
* Maximum number of characters to allow in leaf value
|
|
30
|
+
*/
|
|
31
|
+
export declare const MAX_LEAF_SIZE_: number;
|
|
32
|
+
export declare const isValidKey: (key: unknown) => boolean;
|
|
33
|
+
export declare const isValidPathString: (pathString: string) => boolean;
|
|
34
|
+
export declare const isValidRootPathString: (pathString: string) => boolean;
|
|
35
|
+
export declare const isValidPriority: (priority: unknown) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Pre-validate a datum passed as an argument to Firebase function.
|
|
38
|
+
*/
|
|
39
|
+
export declare const validateFirebaseDataArg: (fnName: string, value: unknown, path: Path, optional: boolean) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Validate a data object client-side before sending to server.
|
|
42
|
+
*/
|
|
43
|
+
export declare const validateFirebaseData: (errorPrefix: string, data: unknown, path_: Path | ValidationPath) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Pre-validate paths passed in the firebase function.
|
|
46
|
+
*/
|
|
47
|
+
export declare const validateFirebaseMergePaths: (errorPrefix: string, mergePaths: Path[]) => void;
|
|
48
|
+
/**
|
|
49
|
+
* pre-validate an object passed as an argument to firebase function (
|
|
50
|
+
* must be an object - e.g. for firebase.update()).
|
|
51
|
+
*/
|
|
52
|
+
export declare const validateFirebaseMergeDataArg: (fnName: string, data: unknown, path: Path, optional: boolean) => void;
|
|
53
|
+
export declare const validatePriority: (fnName: string, priority: unknown, optional: boolean) => void;
|
|
54
|
+
export declare const validateKey: (fnName: string, argumentName: string, key: string, optional: boolean) => void;
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare const validatePathString: (fnName: string, argumentName: string, pathString: string, optional: boolean) => void;
|
|
59
|
+
export declare const validateRootPathString: (fnName: string, argumentName: string, pathString: string, optional: boolean) => void;
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
export declare const validateWritablePath: (fnName: string, path: Path) => void;
|
|
64
|
+
export declare const validateUrl: (fnName: string, parsedUrl: {
|
|
65
|
+
repoInfo: RepoInfo;
|
|
66
|
+
path: Path;
|
|
67
|
+
}) => void;
|
|
68
|
+
export declare const validateString: (fnName: string, argumentName: string, string: unknown, optional: boolean) => void;
|
|
69
|
+
export declare const validateObject: (fnName: string, argumentName: string, obj: unknown, optional: boolean) => void;
|
|
70
|
+
export declare const validateObjectContainsKey: (fnName: string, argumentName: string, obj: unknown, key: string, optional: boolean, optType?: string) => void;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
/** The semver (www.semver.org) version of the SDK. */
|
|
18
|
-
export declare let SDK_VERSION: string;
|
|
19
|
-
/**
|
|
20
|
-
* SDK_VERSION should be set before any database instance is created
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
export declare function setSDKVersion(version: string): void;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/** The semver (www.semver.org) version of the SDK. */
|
|
18
|
+
export declare let SDK_VERSION: string;
|
|
19
|
+
/**
|
|
20
|
+
* SDK_VERSION should be set before any database instance is created
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function setSDKVersion(version: string): void;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { Node } from '../snap/Node';
|
|
18
|
-
import { Path } from '../util/Path';
|
|
19
|
-
/**
|
|
20
|
-
* A cache node only stores complete children. Additionally it holds a flag whether the node can be considered fully
|
|
21
|
-
* initialized in the sense that we know at one point in time this represented a valid state of the world, e.g.
|
|
22
|
-
* initialized with data from the server, or a complete overwrite by the client. The filtered flag also tracks
|
|
23
|
-
* whether a node potentially had children removed due to a filter.
|
|
24
|
-
*/
|
|
25
|
-
export declare class CacheNode {
|
|
26
|
-
private node_;
|
|
27
|
-
private fullyInitialized_;
|
|
28
|
-
private filtered_;
|
|
29
|
-
constructor(node_: Node, fullyInitialized_: boolean, filtered_: boolean);
|
|
30
|
-
/**
|
|
31
|
-
* Returns whether this node was fully initialized with either server data or a complete overwrite by the client
|
|
32
|
-
*/
|
|
33
|
-
isFullyInitialized(): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Returns whether this node is potentially missing children due to a filter applied to the node
|
|
36
|
-
*/
|
|
37
|
-
isFiltered(): boolean;
|
|
38
|
-
isCompleteForPath(path: Path): boolean;
|
|
39
|
-
isCompleteForChild(key: string): boolean;
|
|
40
|
-
getNode(): Node;
|
|
41
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { Node } from '../snap/Node';
|
|
18
|
+
import { Path } from '../util/Path';
|
|
19
|
+
/**
|
|
20
|
+
* A cache node only stores complete children. Additionally it holds a flag whether the node can be considered fully
|
|
21
|
+
* initialized in the sense that we know at one point in time this represented a valid state of the world, e.g.
|
|
22
|
+
* initialized with data from the server, or a complete overwrite by the client. The filtered flag also tracks
|
|
23
|
+
* whether a node potentially had children removed due to a filter.
|
|
24
|
+
*/
|
|
25
|
+
export declare class CacheNode {
|
|
26
|
+
private node_;
|
|
27
|
+
private fullyInitialized_;
|
|
28
|
+
private filtered_;
|
|
29
|
+
constructor(node_: Node, fullyInitialized_: boolean, filtered_: boolean);
|
|
30
|
+
/**
|
|
31
|
+
* Returns whether this node was fully initialized with either server data or a complete overwrite by the client
|
|
32
|
+
*/
|
|
33
|
+
isFullyInitialized(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Returns whether this node is potentially missing children due to a filter applied to the node
|
|
36
|
+
*/
|
|
37
|
+
isFiltered(): boolean;
|
|
38
|
+
isCompleteForPath(path: Path): boolean;
|
|
39
|
+
isCompleteForChild(key: string): boolean;
|
|
40
|
+
getNode(): Node;
|
|
41
|
+
}
|