[typings] Continue work on flow

This commit is contained in:
Chris Bianca
2017-11-23 17:29:40 +00:00
parent fbe73f5dcb
commit ff95c21b9d
36 changed files with 429 additions and 232 deletions

View File

@@ -5,7 +5,7 @@
import Query from './query.js';
import Snapshot from './snapshot';
import Disconnect from './disconnect';
import ReferenceBase from './../../utils/ReferenceBase';
import ReferenceBase from '../../utils/ReferenceBase';
import {
promiseOrCallback,
@@ -15,10 +15,12 @@ import {
tryJSONParse,
tryJSONStringify,
generatePushID,
} from './../../utils';
} from '../../utils';
import INTERNALS from '../../utils/internals';
import type { DatabaseModifier, FirebaseError } from '../../types';
// track all event registrations by path
let listeners = 0;
@@ -35,6 +37,13 @@ const ReferenceEventTypes = {
child_moved: 'child_moved',
};
type DatabaseListener = {
listenerId: number;
eventName: string;
successCallback: Function;
failureCallback?: Function;
}
/**
* @typedef {String} ReferenceLocation - Path to location in the database, relative
* to the root reference. Consists of a path where segments are separated by a