mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-05-28 06:55:31 +08:00
[typings] Continue work on flow
This commit is contained in:
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 ' +
|
||||
|
||||
Reference in New Issue
Block a user