Skip to content

Commit 70276bd

Browse files
author
Robert-Jan Huijsman
authored
Fix up a few details: TrafficSource and database.DeltaSnapshot.toJSON() docs. (#134)
Fix up a few details pointed out by jwenger@: - The TrafficSource interface was still present, and unused. - The database.DeltaSnaphsot.toJSON() documentation was a little confusing to people who aren't familiar with the DeltaSnapshot concepts of previous/current. - child's path argument isn't optional in the client SDK's DataSnapshot, so that specification just adds confusion to the interface. We'll still handle undefined/null cases gracefully, just in case.
1 parent 2fbc725 commit 70276bd

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

src/providers/analytics.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -335,18 +335,6 @@ export interface AppInfo {
335335
appId?: string;
336336
}
337337

338-
/** Information about the marketing campaign which acquired the user that triggered these events. */
339-
export interface TrafficSource {
340-
/** The name of the network which acquired the user. Eg. "Google". */
341-
userAcquiredSource?: string;
342-
343-
/** The name of the medium which acquired the user. Eg. "Banner". */
344-
userAcquiredMedium?: string;
345-
346-
/** The name of the campaign which acquired the user. Eg. "Winter Promo". */
347-
userAcquiredCampaign?: string;
348-
}
349-
350338
/**
351339
* Interface representing the bundle in which these events were uploaded.
352340
*/

src/providers/database.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export class DeltaSnapshot implements firebase.database.DataSnapshot {
187187
return !_.isNull(this.val());
188188
}
189189

190-
child(childPath?: string): DeltaSnapshot {
190+
child(childPath: string): DeltaSnapshot {
191191
if (!childPath) {
192192
return this;
193193
}
@@ -229,8 +229,9 @@ export class DeltaSnapshot implements firebase.database.DataSnapshot {
229229
return _.isPlainObject(val) ? Object.keys(val).length : 0;
230230
}
231231

232-
/** Prints the value of the snapshot; use '.previous' and '.current' to explicitly see
233-
* the previous and current values.
232+
/**
233+
* Prints the value of the snapshot; use '.previous.toJSON()' and '.current.toJSON()' to explicitly see
234+
* the previous and current values of the snapshot.
234235
*/
235236
toJSON(): Object {
236237
return this.val();

0 commit comments

Comments
 (0)