@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,144 +1,144 @@
|
|
|
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 { ValueEventRegistration } from '../api/Reference_impl';
|
|
18
|
-
import { AppCheckTokenProvider } from './AppCheckTokenProvider';
|
|
19
|
-
import { AuthTokenProvider } from './AuthTokenProvider';
|
|
20
|
-
import { PersistentConnection } from './PersistentConnection';
|
|
21
|
-
import { RepoInfo } from './RepoInfo';
|
|
22
|
-
import { ServerActions } from './ServerActions';
|
|
23
|
-
import { Node } from './snap/Node';
|
|
24
|
-
import { SnapshotHolder } from './SnapshotHolder';
|
|
25
|
-
import { SparseSnapshotTree } from './SparseSnapshotTree';
|
|
26
|
-
import { StatsCollection } from './stats/StatsCollection';
|
|
27
|
-
import { StatsListener } from './stats/StatsListener';
|
|
28
|
-
import { StatsReporter } from './stats/StatsReporter';
|
|
29
|
-
import { SyncTree } from './SyncTree';
|
|
30
|
-
import { Indexable } from './util/misc';
|
|
31
|
-
import { Path } from './util/Path';
|
|
32
|
-
import { Tree } from './util/Tree';
|
|
33
|
-
import { EventQueue } from './view/EventQueue';
|
|
34
|
-
import { EventRegistration, QueryContext } from './view/EventRegistration';
|
|
35
|
-
declare const enum TransactionStatus {
|
|
36
|
-
RUN = 0,
|
|
37
|
-
SENT = 1,
|
|
38
|
-
COMPLETED = 2,
|
|
39
|
-
SENT_NEEDS_ABORT = 3,
|
|
40
|
-
NEEDS_ABORT = 4
|
|
41
|
-
}
|
|
42
|
-
interface Transaction {
|
|
43
|
-
path: Path;
|
|
44
|
-
update: (a: unknown) => unknown;
|
|
45
|
-
onComplete: (error: Error | null, committed: boolean, node: Node | null) => void;
|
|
46
|
-
status: TransactionStatus;
|
|
47
|
-
order: number;
|
|
48
|
-
applyLocally: boolean;
|
|
49
|
-
retryCount: number;
|
|
50
|
-
unwatcher: () => void;
|
|
51
|
-
abortReason: string | null;
|
|
52
|
-
currentWriteId: number;
|
|
53
|
-
currentInputSnapshot: Node | null;
|
|
54
|
-
currentOutputSnapshotRaw: Node | null;
|
|
55
|
-
currentOutputSnapshotResolved: Node | null;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* A connection to a single data repository.
|
|
59
|
-
*/
|
|
60
|
-
export declare class Repo {
|
|
61
|
-
repoInfo_: RepoInfo;
|
|
62
|
-
forceRestClient_: boolean;
|
|
63
|
-
authTokenProvider_: AuthTokenProvider;
|
|
64
|
-
appCheckProvider_: AppCheckTokenProvider;
|
|
65
|
-
/** Key for uniquely identifying this repo, used in RepoManager */
|
|
66
|
-
readonly key: string;
|
|
67
|
-
dataUpdateCount: number;
|
|
68
|
-
infoSyncTree_: SyncTree;
|
|
69
|
-
serverSyncTree_: SyncTree;
|
|
70
|
-
stats_: StatsCollection;
|
|
71
|
-
statsListener_: StatsListener | null;
|
|
72
|
-
eventQueue_: EventQueue;
|
|
73
|
-
nextWriteId_: number;
|
|
74
|
-
server_: ServerActions;
|
|
75
|
-
statsReporter_: StatsReporter;
|
|
76
|
-
infoData_: SnapshotHolder;
|
|
77
|
-
interceptServerDataCallback_: ((a: string, b: unknown) => void) | null;
|
|
78
|
-
/** A list of data pieces and paths to be set when this client disconnects. */
|
|
79
|
-
onDisconnect_: SparseSnapshotTree;
|
|
80
|
-
/** Stores queues of outstanding transactions for Firebase locations. */
|
|
81
|
-
transactionQueueTree_: Tree<Transaction[]>;
|
|
82
|
-
persistentConnection_: PersistentConnection | null;
|
|
83
|
-
constructor(repoInfo_: RepoInfo, forceRestClient_: boolean, authTokenProvider_: AuthTokenProvider, appCheckProvider_: AppCheckTokenProvider);
|
|
84
|
-
/**
|
|
85
|
-
* @returns The URL corresponding to the root of this Firebase.
|
|
86
|
-
*/
|
|
87
|
-
toString(): string;
|
|
88
|
-
}
|
|
89
|
-
export declare function repoStart(repo: Repo, appId: string, authOverride?: object): void;
|
|
90
|
-
/**
|
|
91
|
-
* @returns The time in milliseconds, taking the server offset into account if we have one.
|
|
92
|
-
*/
|
|
93
|
-
export declare function repoServerTime(repo: Repo): number;
|
|
94
|
-
/**
|
|
95
|
-
* Generate ServerValues using some variables from the repo object.
|
|
96
|
-
*/
|
|
97
|
-
export declare function repoGenerateServerValues(repo: Repo): Indexable;
|
|
98
|
-
export declare function repoInterceptServerData(repo: Repo, callback: ((a: string, b: unknown) => unknown) | null): void;
|
|
99
|
-
/**
|
|
100
|
-
* The purpose of `getValue` is to return the latest known value
|
|
101
|
-
* satisfying `query`.
|
|
102
|
-
*
|
|
103
|
-
* This method will first check for in-memory cached values
|
|
104
|
-
* belonging to active listeners. If they are found, such values
|
|
105
|
-
* are considered to be the most up-to-date.
|
|
106
|
-
*
|
|
107
|
-
* If the client is not connected, this method will wait until the
|
|
108
|
-
* repo has established a connection and then request the value for `query`.
|
|
109
|
-
* If the client is not able to retrieve the query result for another reason,
|
|
110
|
-
* it reports an error.
|
|
111
|
-
*
|
|
112
|
-
* @param query - The query to surface a value for.
|
|
113
|
-
*/
|
|
114
|
-
export declare function repoGetValue(repo: Repo, query: QueryContext, eventRegistration: ValueEventRegistration): Promise<Node>;
|
|
115
|
-
export declare function repoSetWithPriority(repo: Repo, path: Path, newVal: unknown, newPriority: number | string | null, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
116
|
-
export declare function repoUpdate(repo: Repo, path: Path, childrenToMerge: {
|
|
117
|
-
[k: string]: unknown;
|
|
118
|
-
}, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
119
|
-
export declare function repoOnDisconnectCancel(repo: Repo, path: Path, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
120
|
-
export declare function repoOnDisconnectSet(repo: Repo, path: Path, value: unknown, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
121
|
-
export declare function repoOnDisconnectSetWithPriority(repo: Repo, path: Path, value: unknown, priority: unknown, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
122
|
-
export declare function repoOnDisconnectUpdate(repo: Repo, path: Path, childrenToMerge: {
|
|
123
|
-
[k: string]: unknown;
|
|
124
|
-
}, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
125
|
-
export declare function repoAddEventCallbackForQuery(repo: Repo, query: QueryContext, eventRegistration: EventRegistration): void;
|
|
126
|
-
export declare function repoRemoveEventCallbackForQuery(repo: Repo, query: QueryContext, eventRegistration: EventRegistration): void;
|
|
127
|
-
export declare function repoInterrupt(repo: Repo): void;
|
|
128
|
-
export declare function repoResume(repo: Repo): void;
|
|
129
|
-
export declare function repoStats(repo: Repo, showDelta?: boolean): void;
|
|
130
|
-
export declare function repoStatsIncrementCounter(repo: Repo, metric: string): void;
|
|
131
|
-
export declare function repoCallOnCompleteCallback(repo: Repo, callback: ((status: Error | null, errorReason?: string) => void) | null, status: string, errorReason?: string | null): void;
|
|
132
|
-
/**
|
|
133
|
-
* Creates a new transaction, adds it to the transactions we're tracking, and
|
|
134
|
-
* sends it to the server if possible.
|
|
135
|
-
*
|
|
136
|
-
* @param path - Path at which to do transaction.
|
|
137
|
-
* @param transactionUpdate - Update callback.
|
|
138
|
-
* @param onComplete - Completion callback.
|
|
139
|
-
* @param unwatcher - Function that will be called when the transaction no longer
|
|
140
|
-
* need data updates for `path`.
|
|
141
|
-
* @param applyLocally - Whether or not to make intermediate results visible
|
|
142
|
-
*/
|
|
143
|
-
export declare function repoStartTransaction(repo: Repo, path: Path, transactionUpdate: (a: unknown) => unknown, onComplete: ((error: Error, committed: boolean, node: Node) => void) | null, unwatcher: () => void, applyLocally: boolean): void;
|
|
144
|
-
export {};
|
|
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 { ValueEventRegistration } from '../api/Reference_impl';
|
|
18
|
+
import { AppCheckTokenProvider } from './AppCheckTokenProvider';
|
|
19
|
+
import { AuthTokenProvider } from './AuthTokenProvider';
|
|
20
|
+
import { PersistentConnection } from './PersistentConnection';
|
|
21
|
+
import { RepoInfo } from './RepoInfo';
|
|
22
|
+
import { ServerActions } from './ServerActions';
|
|
23
|
+
import { Node } from './snap/Node';
|
|
24
|
+
import { SnapshotHolder } from './SnapshotHolder';
|
|
25
|
+
import { SparseSnapshotTree } from './SparseSnapshotTree';
|
|
26
|
+
import { StatsCollection } from './stats/StatsCollection';
|
|
27
|
+
import { StatsListener } from './stats/StatsListener';
|
|
28
|
+
import { StatsReporter } from './stats/StatsReporter';
|
|
29
|
+
import { SyncTree } from './SyncTree';
|
|
30
|
+
import { Indexable } from './util/misc';
|
|
31
|
+
import { Path } from './util/Path';
|
|
32
|
+
import { Tree } from './util/Tree';
|
|
33
|
+
import { EventQueue } from './view/EventQueue';
|
|
34
|
+
import { EventRegistration, QueryContext } from './view/EventRegistration';
|
|
35
|
+
declare const enum TransactionStatus {
|
|
36
|
+
RUN = 0,
|
|
37
|
+
SENT = 1,
|
|
38
|
+
COMPLETED = 2,
|
|
39
|
+
SENT_NEEDS_ABORT = 3,
|
|
40
|
+
NEEDS_ABORT = 4
|
|
41
|
+
}
|
|
42
|
+
interface Transaction {
|
|
43
|
+
path: Path;
|
|
44
|
+
update: (a: unknown) => unknown;
|
|
45
|
+
onComplete: (error: Error | null, committed: boolean, node: Node | null) => void;
|
|
46
|
+
status: TransactionStatus;
|
|
47
|
+
order: number;
|
|
48
|
+
applyLocally: boolean;
|
|
49
|
+
retryCount: number;
|
|
50
|
+
unwatcher: () => void;
|
|
51
|
+
abortReason: string | null;
|
|
52
|
+
currentWriteId: number;
|
|
53
|
+
currentInputSnapshot: Node | null;
|
|
54
|
+
currentOutputSnapshotRaw: Node | null;
|
|
55
|
+
currentOutputSnapshotResolved: Node | null;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A connection to a single data repository.
|
|
59
|
+
*/
|
|
60
|
+
export declare class Repo {
|
|
61
|
+
repoInfo_: RepoInfo;
|
|
62
|
+
forceRestClient_: boolean;
|
|
63
|
+
authTokenProvider_: AuthTokenProvider;
|
|
64
|
+
appCheckProvider_: AppCheckTokenProvider;
|
|
65
|
+
/** Key for uniquely identifying this repo, used in RepoManager */
|
|
66
|
+
readonly key: string;
|
|
67
|
+
dataUpdateCount: number;
|
|
68
|
+
infoSyncTree_: SyncTree;
|
|
69
|
+
serverSyncTree_: SyncTree;
|
|
70
|
+
stats_: StatsCollection;
|
|
71
|
+
statsListener_: StatsListener | null;
|
|
72
|
+
eventQueue_: EventQueue;
|
|
73
|
+
nextWriteId_: number;
|
|
74
|
+
server_: ServerActions;
|
|
75
|
+
statsReporter_: StatsReporter;
|
|
76
|
+
infoData_: SnapshotHolder;
|
|
77
|
+
interceptServerDataCallback_: ((a: string, b: unknown) => void) | null;
|
|
78
|
+
/** A list of data pieces and paths to be set when this client disconnects. */
|
|
79
|
+
onDisconnect_: SparseSnapshotTree;
|
|
80
|
+
/** Stores queues of outstanding transactions for Firebase locations. */
|
|
81
|
+
transactionQueueTree_: Tree<Transaction[]>;
|
|
82
|
+
persistentConnection_: PersistentConnection | null;
|
|
83
|
+
constructor(repoInfo_: RepoInfo, forceRestClient_: boolean, authTokenProvider_: AuthTokenProvider, appCheckProvider_: AppCheckTokenProvider);
|
|
84
|
+
/**
|
|
85
|
+
* @returns The URL corresponding to the root of this Firebase.
|
|
86
|
+
*/
|
|
87
|
+
toString(): string;
|
|
88
|
+
}
|
|
89
|
+
export declare function repoStart(repo: Repo, appId: string, authOverride?: object): void;
|
|
90
|
+
/**
|
|
91
|
+
* @returns The time in milliseconds, taking the server offset into account if we have one.
|
|
92
|
+
*/
|
|
93
|
+
export declare function repoServerTime(repo: Repo): number;
|
|
94
|
+
/**
|
|
95
|
+
* Generate ServerValues using some variables from the repo object.
|
|
96
|
+
*/
|
|
97
|
+
export declare function repoGenerateServerValues(repo: Repo): Indexable;
|
|
98
|
+
export declare function repoInterceptServerData(repo: Repo, callback: ((a: string, b: unknown) => unknown) | null): void;
|
|
99
|
+
/**
|
|
100
|
+
* The purpose of `getValue` is to return the latest known value
|
|
101
|
+
* satisfying `query`.
|
|
102
|
+
*
|
|
103
|
+
* This method will first check for in-memory cached values
|
|
104
|
+
* belonging to active listeners. If they are found, such values
|
|
105
|
+
* are considered to be the most up-to-date.
|
|
106
|
+
*
|
|
107
|
+
* If the client is not connected, this method will wait until the
|
|
108
|
+
* repo has established a connection and then request the value for `query`.
|
|
109
|
+
* If the client is not able to retrieve the query result for another reason,
|
|
110
|
+
* it reports an error.
|
|
111
|
+
*
|
|
112
|
+
* @param query - The query to surface a value for.
|
|
113
|
+
*/
|
|
114
|
+
export declare function repoGetValue(repo: Repo, query: QueryContext, eventRegistration: ValueEventRegistration): Promise<Node>;
|
|
115
|
+
export declare function repoSetWithPriority(repo: Repo, path: Path, newVal: unknown, newPriority: number | string | null, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
116
|
+
export declare function repoUpdate(repo: Repo, path: Path, childrenToMerge: {
|
|
117
|
+
[k: string]: unknown;
|
|
118
|
+
}, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
119
|
+
export declare function repoOnDisconnectCancel(repo: Repo, path: Path, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
120
|
+
export declare function repoOnDisconnectSet(repo: Repo, path: Path, value: unknown, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
121
|
+
export declare function repoOnDisconnectSetWithPriority(repo: Repo, path: Path, value: unknown, priority: unknown, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
122
|
+
export declare function repoOnDisconnectUpdate(repo: Repo, path: Path, childrenToMerge: {
|
|
123
|
+
[k: string]: unknown;
|
|
124
|
+
}, onComplete: ((status: Error | null, errorReason?: string) => void) | null): void;
|
|
125
|
+
export declare function repoAddEventCallbackForQuery(repo: Repo, query: QueryContext, eventRegistration: EventRegistration): void;
|
|
126
|
+
export declare function repoRemoveEventCallbackForQuery(repo: Repo, query: QueryContext, eventRegistration: EventRegistration): void;
|
|
127
|
+
export declare function repoInterrupt(repo: Repo): void;
|
|
128
|
+
export declare function repoResume(repo: Repo): void;
|
|
129
|
+
export declare function repoStats(repo: Repo, showDelta?: boolean): void;
|
|
130
|
+
export declare function repoStatsIncrementCounter(repo: Repo, metric: string): void;
|
|
131
|
+
export declare function repoCallOnCompleteCallback(repo: Repo, callback: ((status: Error | null, errorReason?: string) => void) | null, status: string, errorReason?: string | null): void;
|
|
132
|
+
/**
|
|
133
|
+
* Creates a new transaction, adds it to the transactions we're tracking, and
|
|
134
|
+
* sends it to the server if possible.
|
|
135
|
+
*
|
|
136
|
+
* @param path - Path at which to do transaction.
|
|
137
|
+
* @param transactionUpdate - Update callback.
|
|
138
|
+
* @param onComplete - Completion callback.
|
|
139
|
+
* @param unwatcher - Function that will be called when the transaction no longer
|
|
140
|
+
* need data updates for `path`.
|
|
141
|
+
* @param applyLocally - Whether or not to make intermediate results visible
|
|
142
|
+
*/
|
|
143
|
+
export declare function repoStartTransaction(repo: Repo, path: Path, transactionUpdate: (a: unknown) => unknown, onComplete: ((error: Error, committed: boolean, node: Node) => void) | null, unwatcher: () => void, applyLocally: boolean): void;
|
|
144
|
+
export {};
|
|
@@ -1,56 +1,56 @@
|
|
|
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
|
-
/**
|
|
18
|
-
* A class that holds metadata about a Repo object
|
|
19
|
-
*/
|
|
20
|
-
export declare class RepoInfo {
|
|
21
|
-
readonly secure: boolean;
|
|
22
|
-
readonly namespace: string;
|
|
23
|
-
readonly webSocketOnly: boolean;
|
|
24
|
-
readonly nodeAdmin: boolean;
|
|
25
|
-
readonly persistenceKey: string;
|
|
26
|
-
readonly includeNamespaceInQueryParams: boolean;
|
|
27
|
-
readonly isUsingEmulator: boolean;
|
|
28
|
-
private _host;
|
|
29
|
-
private _domain;
|
|
30
|
-
internalHost: string;
|
|
31
|
-
/**
|
|
32
|
-
* @param host - Hostname portion of the url for the repo
|
|
33
|
-
* @param secure - Whether or not this repo is accessed over ssl
|
|
34
|
-
* @param namespace - The namespace represented by the repo
|
|
35
|
-
* @param webSocketOnly - Whether to prefer websockets over all other transports (used by Nest).
|
|
36
|
-
* @param nodeAdmin - Whether this instance uses Admin SDK credentials
|
|
37
|
-
* @param persistenceKey - Override the default session persistence storage key
|
|
38
|
-
*/
|
|
39
|
-
constructor(host: string, secure: boolean, namespace: string, webSocketOnly: boolean, nodeAdmin?: boolean, persistenceKey?: string, includeNamespaceInQueryParams?: boolean, isUsingEmulator?: boolean);
|
|
40
|
-
isCacheableHost(): boolean;
|
|
41
|
-
isCustomHost(): boolean;
|
|
42
|
-
get host(): string;
|
|
43
|
-
set host(newHost: string);
|
|
44
|
-
toString(): string;
|
|
45
|
-
toURLString(): string;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Returns the websocket URL for this repo
|
|
49
|
-
* @param repoInfo - RepoInfo object
|
|
50
|
-
* @param type - of connection
|
|
51
|
-
* @param params - list
|
|
52
|
-
* @returns The URL for this repo
|
|
53
|
-
*/
|
|
54
|
-
export declare function repoInfoConnectionURL(repoInfo: RepoInfo, type: string, params: {
|
|
55
|
-
[k: string]: string;
|
|
56
|
-
}): string;
|
|
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
|
+
/**
|
|
18
|
+
* A class that holds metadata about a Repo object
|
|
19
|
+
*/
|
|
20
|
+
export declare class RepoInfo {
|
|
21
|
+
readonly secure: boolean;
|
|
22
|
+
readonly namespace: string;
|
|
23
|
+
readonly webSocketOnly: boolean;
|
|
24
|
+
readonly nodeAdmin: boolean;
|
|
25
|
+
readonly persistenceKey: string;
|
|
26
|
+
readonly includeNamespaceInQueryParams: boolean;
|
|
27
|
+
readonly isUsingEmulator: boolean;
|
|
28
|
+
private _host;
|
|
29
|
+
private _domain;
|
|
30
|
+
internalHost: string;
|
|
31
|
+
/**
|
|
32
|
+
* @param host - Hostname portion of the url for the repo
|
|
33
|
+
* @param secure - Whether or not this repo is accessed over ssl
|
|
34
|
+
* @param namespace - The namespace represented by the repo
|
|
35
|
+
* @param webSocketOnly - Whether to prefer websockets over all other transports (used by Nest).
|
|
36
|
+
* @param nodeAdmin - Whether this instance uses Admin SDK credentials
|
|
37
|
+
* @param persistenceKey - Override the default session persistence storage key
|
|
38
|
+
*/
|
|
39
|
+
constructor(host: string, secure: boolean, namespace: string, webSocketOnly: boolean, nodeAdmin?: boolean, persistenceKey?: string, includeNamespaceInQueryParams?: boolean, isUsingEmulator?: boolean);
|
|
40
|
+
isCacheableHost(): boolean;
|
|
41
|
+
isCustomHost(): boolean;
|
|
42
|
+
get host(): string;
|
|
43
|
+
set host(newHost: string);
|
|
44
|
+
toString(): string;
|
|
45
|
+
toURLString(): string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns the websocket URL for this repo
|
|
49
|
+
* @param repoInfo - RepoInfo object
|
|
50
|
+
* @param type - of connection
|
|
51
|
+
* @param params - list
|
|
52
|
+
* @returns The URL for this repo
|
|
53
|
+
*/
|
|
54
|
+
export declare function repoInfoConnectionURL(repoInfo: RepoInfo, type: string, params: {
|
|
55
|
+
[k: string]: string;
|
|
56
|
+
}): string;
|
|
@@ -1,52 +1,52 @@
|
|
|
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
|
-
* Interface defining the set of actions that can be performed against the Firebase server
|
|
20
|
-
* (basically corresponds to our wire protocol).
|
|
21
|
-
*
|
|
22
|
-
* @interface
|
|
23
|
-
*/
|
|
24
|
-
export declare abstract class ServerActions {
|
|
25
|
-
abstract listen(query: QueryContext, currentHashFn: () => string, tag: number | null, onComplete: (a: string, b: unknown) => void): void;
|
|
26
|
-
/**
|
|
27
|
-
* Remove a listen.
|
|
28
|
-
*/
|
|
29
|
-
abstract unlisten(query: QueryContext, tag: number | null): void;
|
|
30
|
-
/**
|
|
31
|
-
* Get the server value satisfying this query.
|
|
32
|
-
*/
|
|
33
|
-
abstract get(query: QueryContext): Promise<string>;
|
|
34
|
-
put(pathString: string, data: unknown, onComplete?: (a: string, b: string) => void, hash?: string): void;
|
|
35
|
-
merge(pathString: string, data: unknown, onComplete: (a: string, b: string | null) => void, hash?: string): void;
|
|
36
|
-
/**
|
|
37
|
-
* Refreshes the auth token for the current connection.
|
|
38
|
-
* @param token - The authentication token
|
|
39
|
-
*/
|
|
40
|
-
refreshAuthToken(token: string): void;
|
|
41
|
-
/**
|
|
42
|
-
* Refreshes the app check token for the current connection.
|
|
43
|
-
* @param token The app check token
|
|
44
|
-
*/
|
|
45
|
-
refreshAppCheckToken(token: string): void;
|
|
46
|
-
onDisconnectPut(pathString: string, data: unknown, onComplete?: (a: string, b: string) => void): void;
|
|
47
|
-
onDisconnectMerge(pathString: string, data: unknown, onComplete?: (a: string, b: string) => void): void;
|
|
48
|
-
onDisconnectCancel(pathString: string, onComplete?: (a: string, b: string) => void): void;
|
|
49
|
-
reportStats(stats: {
|
|
50
|
-
[k: string]: unknown;
|
|
51
|
-
}): void;
|
|
52
|
-
}
|
|
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
|
+
* Interface defining the set of actions that can be performed against the Firebase server
|
|
20
|
+
* (basically corresponds to our wire protocol).
|
|
21
|
+
*
|
|
22
|
+
* @interface
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class ServerActions {
|
|
25
|
+
abstract listen(query: QueryContext, currentHashFn: () => string, tag: number | null, onComplete: (a: string, b: unknown) => void): void;
|
|
26
|
+
/**
|
|
27
|
+
* Remove a listen.
|
|
28
|
+
*/
|
|
29
|
+
abstract unlisten(query: QueryContext, tag: number | null): void;
|
|
30
|
+
/**
|
|
31
|
+
* Get the server value satisfying this query.
|
|
32
|
+
*/
|
|
33
|
+
abstract get(query: QueryContext): Promise<string>;
|
|
34
|
+
put(pathString: string, data: unknown, onComplete?: (a: string, b: string) => void, hash?: string): void;
|
|
35
|
+
merge(pathString: string, data: unknown, onComplete: (a: string, b: string | null) => void, hash?: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Refreshes the auth token for the current connection.
|
|
38
|
+
* @param token - The authentication token
|
|
39
|
+
*/
|
|
40
|
+
refreshAuthToken(token: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Refreshes the app check token for the current connection.
|
|
43
|
+
* @param token The app check token
|
|
44
|
+
*/
|
|
45
|
+
refreshAppCheckToken(token: string): void;
|
|
46
|
+
onDisconnectPut(pathString: string, data: unknown, onComplete?: (a: string, b: string) => void): void;
|
|
47
|
+
onDisconnectMerge(pathString: string, data: unknown, onComplete?: (a: string, b: string) => void): void;
|
|
48
|
+
onDisconnectCancel(pathString: string, onComplete?: (a: string, b: string) => void): void;
|
|
49
|
+
reportStats(stats: {
|
|
50
|
+
[k: string]: unknown;
|
|
51
|
+
}): void;
|
|
52
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
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
|
-
* Mutable object which basically just stores a reference to the "latest" immutable snapshot.
|
|
21
|
-
*/
|
|
22
|
-
export declare class SnapshotHolder {
|
|
23
|
-
private rootNode_;
|
|
24
|
-
getNode(path: Path): Node;
|
|
25
|
-
updateSnapshot(path: Path, newSnapshotNode: Node): void;
|
|
26
|
-
}
|
|
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
|
+
* Mutable object which basically just stores a reference to the "latest" immutable snapshot.
|
|
21
|
+
*/
|
|
22
|
+
export declare class SnapshotHolder {
|
|
23
|
+
private rootNode_;
|
|
24
|
+
getNode(path: Path): Node;
|
|
25
|
+
updateSnapshot(path: Path, newSnapshotNode: Node): void;
|
|
26
|
+
}
|