Skip to content

Commit

Permalink
Updated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
maneesht committed Aug 19, 2022
1 parent 03606cc commit 87c407c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
3 changes: 2 additions & 1 deletion common/api-review/database.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import { EmulatorMockTokenOptions } from '@firebase/util';
import { FirebaseApp } from '@firebase/app';
import { _FirebaseService } from '@firebase/app';

// @public
export function child(parent: DatabaseReference, path: string): DatabaseReference;
Expand All @@ -16,7 +17,7 @@ export function connectDatabaseEmulator(db: Database, host: string, port: number
}): void;

// @public
export class Database {
export class Database implements _FirebaseService {
readonly app: FirebaseApp;
readonly 'type' = "database";
}
Expand Down
6 changes: 1 addition & 5 deletions packages/database-compat/src/api/Reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ export class DataSnapshot implements Compat<ModularDataSnapshot> {
return this._delegate.priority;
}



/**
* Iterates through child nodes and calls the specified action for each one.
*
Expand All @@ -166,9 +164,7 @@ export class DataSnapshot implements Compat<ModularDataSnapshot> {
* @returns True if forEach was canceled by action returning true for
* one of the child nodes.
*/
forEach(
action: (snapshot: IteratedDataSnapshot) => boolean | void
): boolean {
forEach(action: (snapshot: IteratedDataSnapshot) => boolean | void): boolean {
validateArgCount('DataSnapshot.forEach', 1, 1, arguments.length);
validateCallback('DataSnapshot.forEach', 'action', action, false);
return this._delegate.forEach(expDataSnapshot =>
Expand Down
4 changes: 1 addition & 3 deletions packages/database-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export interface DataSnapshot {
child(path: string): DataSnapshot;
exists(): boolean;
exportVal(): any;
forEach(
action: (a: IteratedDataSnapshot) => boolean | void
): boolean;
forEach(action: (a: IteratedDataSnapshot) => boolean | void): boolean;
getPriority(): string | number | null;
hasChild(path: string): boolean;
hasChildren(): boolean;
Expand Down
4 changes: 1 addition & 3 deletions packages/database/src/api/Reference_impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,7 @@ export class DataSnapshot {
* @returns true if enumeration was canceled due to your callback returning
* true.
*/
forEach(
action: (child: IteratedDataSnapshot) => boolean | void
): boolean {
forEach(action: (child: IteratedDataSnapshot) => boolean | void): boolean {
if (this._node.isLeafNode()) {
return false;
}
Expand Down
4 changes: 1 addition & 3 deletions packages/firebase/compat/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5819,9 +5819,7 @@ declare namespace firebase.database {
* returning true.
*/
forEach(
action: (
a: firebase.database.IteratorDataSnapshot
) => boolean | void
action: (a: firebase.database.IteratorDataSnapshot) => boolean | void
): boolean;
/**
* Gets the priority value of the data in this `DataSnapshot`.
Expand Down

0 comments on commit 87c407c

Please sign in to comment.