File tree Expand file tree Collapse file tree 5 files changed +20
-13
lines changed Expand file tree Collapse file tree 5 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ export class DataSnapshot {
16
16
hasChildren(): boolean ;
17
17
get key(): string | null ;
18
18
get priority(): string | number | null ;
19
- // (undocumented)
20
19
readonly ref: Reference ;
21
20
get size(): number ;
22
21
toJSON(): object | null ;
@@ -43,9 +42,7 @@ export type EventType = 'value' | 'child_added' | 'child_changed' | 'child_moved
43
42
44
43
// @public
45
44
export class FirebaseDatabase {
46
- // (undocumented)
47
45
readonly app: FirebaseApp ;
48
- // (undocumented)
49
46
readonly ' type' = " database" ;
50
47
}
51
48
@@ -215,14 +212,10 @@ export interface TransactionOptions {
215
212
readonly applyLocally? : boolean ;
216
213
}
217
214
218
- // @public (undocumented)
215
+ // @public
219
216
export class TransactionResult {
220
- constructor (committed : boolean , snapshot : DataSnapshot );
221
- // (undocumented)
222
217
readonly committed: boolean ;
223
- // (undocumented)
224
218
readonly snapshot: DataSnapshot ;
225
- // (undocumented)
226
219
toJSON(): object ;
227
220
}
228
221
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ import { runTransaction } from '../exp/Transaction';
72
72
import { Database } from './Database' ;
73
73
import { OnDisconnect } from './onDisconnect' ;
74
74
import { TransactionResult } from './TransactionResult' ;
75
+
75
76
/**
76
77
* Class representing a firebase data snapshot. It wraps a SnapshotNode and
77
78
* surfaces the public methods (val, forEach, etc.) we want to expose.
Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ export function repoManagerForceRestClient(forceRestClient: boolean): void {
200
200
* Class representing a Firebase Realtime Database.
201
201
*/
202
202
export class FirebaseDatabase implements _FirebaseService {
203
+ /** Represents a database instance. */
203
204
readonly 'type' = 'database' ;
204
205
205
206
/** Track if the instance has been used (root or repo accessed) */
@@ -209,7 +210,11 @@ export class FirebaseDatabase implements _FirebaseService {
209
210
private _rootInternal ?: ReferenceImpl ;
210
211
211
212
/** @hideconstructor */
212
- constructor ( private _repoInternal : Repo , readonly app : FirebaseApp ) { }
213
+ constructor (
214
+ private _repoInternal : Repo ,
215
+ /** The FirebaseApp associated with this Realtime Database instance. */
216
+ readonly app : FirebaseApp
217
+ ) { }
213
218
214
219
get _repo ( ) : Repo {
215
220
if ( ! this . _instanceStarted ) {
Original file line number Diff line number Diff line change @@ -289,6 +289,7 @@ export class DataSnapshot {
289
289
*/
290
290
constructor (
291
291
readonly _node : Node ,
292
+ /** The location of this DataSnapshot. */
292
293
readonly ref : ReferenceImpl ,
293
294
readonly _index : Index
294
295
) { }
Original file line number Diff line number Diff line change @@ -36,12 +36,19 @@ export interface TransactionOptions {
36
36
readonly applyLocally ?: boolean ;
37
37
}
38
38
39
+ /**
40
+ * A type for the resolve value of Firebase.transaction.
41
+ */
39
42
export class TransactionResult {
40
- /**
41
- * A type for the resolve value of Firebase.transaction.
42
- */
43
- constructor ( readonly committed : boolean , readonly snapshot : DataSnapshot ) { }
43
+ /** @hideconstructor */
44
+ constructor (
45
+ /** Whether the transaction was successfully committed. */
46
+ readonly committed : boolean ,
47
+ /** The resulting data snapshot. */
48
+ readonly snapshot : DataSnapshot
49
+ ) { }
44
50
51
+ /** Returns a JSON-serializable representation of this object. */
45
52
toJSON ( ) : object {
46
53
return { committed : this . committed , snapshot : this . snapshot . toJSON ( ) } ;
47
54
}
You can’t perform that action at this time.
0 commit comments