[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

@@ -9,6 +9,7 @@ import FirebaseCore from '../modules/core/firebase';
import { nativeWithApp } from '../utils';
import type FirebaseApp from '../modules/core/firebase-app';
import type { FirebaseModuleName } from '../types';
const logs = {};
@@ -53,7 +54,7 @@ export default class ModuleBase {
_namespace: string;
_firebaseApp: FirebaseApp;
_eventEmitter: Object;
static _NAMESPACE: string;
static _NAMESPACE: FirebaseModuleName;
static _NATIVE_MODULE: string;
/**

View File

@@ -3,10 +3,10 @@
*/
import { NativeEventEmitter } from 'react-native';
import INTERNALS from './../internals';
import DatabaseSnapshot from './../modules/database/snapshot';
import DatabaseReference from './../modules/database/reference';
import { isString, nativeToJSError } from './../utils';
import INTERNALS from './internals';
import DatabaseSnapshot from '../modules/database/snapshot';
import DatabaseReference from '../modules/database/reference';
import { isString, nativeToJSError } from '../utils';
type Registration = {
key: string,

View File

@@ -7,6 +7,8 @@ import EventEmitter from './emitter/EventEmitter';
import ModuleBase from './ModuleBase';
import SyncTree from './SyncTree';
import type FirebaseApp from '../modules/core/firebase-app';
const DEFAULT_APP_NAME = Platform.OS === 'ios' ? '__FIRAPP_DEFAULT' : '[DEFAULT]';
const NAMESPACE_PODS = {
@@ -53,6 +55,8 @@ const PLAY_SERVICES_CODES = {
},
};
const APPS: { [string]: FirebaseApp } = {};
export default {
// default options
OPTIONS: {
@@ -66,9 +70,7 @@ export default {
},
// track all initialized firebase apps
APPS: {
[DEFAULT_APP_NAME]: null,
},
APPS,
STRINGS: {
WARN_INITIALIZE_DEPRECATION: 'Deprecation: Calling \'initializeApp()\' for apps that are already initialised natively ' +