diff --git a/packages/app/lib/index.d.ts b/packages/app/lib/index.d.ts index 3901c4b9..ee91c7f2 100644 --- a/packages/app/lib/index.d.ts +++ b/packages/app/lib/index.d.ts @@ -15,7 +15,7 @@ * */ -import {ReactNativeFirebaseNamespace} from "@react-native-firebase/app-types"; +import { ReactNativeFirebaseNamespace } from '@react-native-firebase/app-types'; /** * @firebase firebase diff --git a/packages/common/lib/deeps.js b/packages/common/lib/deeps.js index e49ed312..79da13c4 100644 --- a/packages/common/lib/deeps.js +++ b/packages/common/lib/deeps.js @@ -8,6 +8,7 @@ import { isObject } from './validate'; * @param joiner * @returns {*} */ +// eslint-disable-next-line import/prefer-default-export export function deepGet(object, path, joiner = '/') { if (!isObject(object) && !Array.isArray(object)) return undefined; const keys = path.split(joiner); diff --git a/packages/common/lib/id.js b/packages/common/lib/id.js index ad69c4b1..7f0d45a4 100644 --- a/packages/common/lib/id.js +++ b/packages/common/lib/id.js @@ -1,9 +1,6 @@ +const PUSH_CHARS = '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz'; -const PUSH_CHARS = - '-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz'; - -const AUTO_ID_CHARS = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; +const AUTO_ID_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; // timestamp of last push, used to prevent local collisions if you push twice in one ms. let lastPushTime = 0; @@ -69,9 +66,7 @@ export function generateFirestoreId(): string { let autoId = ''; for (let i = 0; i < 20; i++) { - autoId += AUTO_ID_CHARS.charAt( - Math.floor(Math.random() * AUTO_ID_CHARS.length) - ); + autoId += AUTO_ID_CHARS.charAt(Math.floor(Math.random() * AUTO_ID_CHARS.length)); } return autoId; } diff --git a/packages/common/lib/path.js b/packages/common/lib/path.js index 6e1d1acc..4e8b54cd 100644 --- a/packages/common/lib/path.js +++ b/packages/common/lib/path.js @@ -100,7 +100,7 @@ export function isValidPath(path) { return typeof path === 'string' && path.length !== 0 && !INVALID_PATH_REGEX.test(path); } -// eslint-disable-next-line no-control-regex +// eslint-disable-next-line no-control-regex,no-useless-escape export const INVALID_KEY_REGEX = /[\[\].#$\/\u0000-\u001F\u007F]/; /** diff --git a/packages/config/e2e/config.e2e.js b/packages/config/e2e/config.e2e.js index 29c8be43..9d08124e 100644 --- a/packages/config/e2e/config.e2e.js +++ b/packages/config/e2e/config.e2e.js @@ -49,6 +49,7 @@ describe('config()', () => { await firebase.config().fetch(0); firebase.config().lastFetchStatus.should.equal(firebase.config.LastFetchStatus.SUCCESS); // TODO leave logger here - need to investigate flakey test + // eslint-disable-next-line no-console console.log(firebase.config().lastFetchTime, date); should.equal(firebase.config().lastFetchTime >= date, true); }); diff --git a/packages/database/e2e/helpers.js b/packages/database/e2e/helpers.js index a3ade8cc..67a9205a 100644 --- a/packages/database/e2e/helpers.js +++ b/packages/database/e2e/helpers.js @@ -32,13 +32,21 @@ const CONTENT = { exports.seed = function seed(path) { return Promise.all([ - firebase.database().ref(`${path}/types`).set(CONTENT.TYPES), - firebase.database().ref(`${path}/query`).set(CONTENT.QUERY), + firebase + .database() + .ref(`${path}/types`) + .set(CONTENT.TYPES), + firebase + .database() + .ref(`${path}/query`) + .set(CONTENT.QUERY), ]); }; exports.wipe = function wipe(path) { - return firebase.database().ref(path) + return firebase + .database() + .ref(path) .remove(); }; diff --git a/packages/database/e2e/internal/connected.e2e.js b/packages/database/e2e/internal/connected.e2e.js index b6af025d..b475ac2e 100644 --- a/packages/database/e2e/internal/connected.e2e.js +++ b/packages/database/e2e/internal/connected.e2e.js @@ -16,7 +16,6 @@ */ describe(`database().ref('.info/connected')`, () => { - after(() => firebase.database().goOnline()); it('returns false when used with once', async () => { @@ -43,9 +42,7 @@ describe(`database().ref('.info/connected')`, () => { const callback = sinon.spy(); await firebase.database().goOffline(); - const ref = firebase - .database() - .ref('.info/connected'); + const ref = firebase.database().ref('.info/connected'); const handler = $ => { callback($.val()); diff --git a/packages/database/e2e/onDisconnect/cancel.e2e.js b/packages/database/e2e/onDisconnect/cancel.e2e.js index 74881d13..cef46118 100644 --- a/packages/database/e2e/onDisconnect/cancel.e2e.js +++ b/packages/database/e2e/onDisconnect/cancel.e2e.js @@ -20,7 +20,6 @@ const { PATH, wipe } = require('../helpers'); const TEST_PATH = `${PATH}/onDisconnectCancel`; describe('database().ref().onDisconnect().cancel()', () => { - after(() => wipe(TEST_PATH)); afterEach(() => { @@ -29,7 +28,10 @@ describe('database().ref().onDisconnect().cancel()', () => { }); it('throws if onComplete is not a function', () => { - const ref = firebase.database().ref(TEST_PATH).onDisconnect(); + const ref = firebase + .database() + .ref(TEST_PATH) + .onDisconnect(); try { ref.cancel('foo'); return Promise.reject(new Error('Did not throw an Error.')); diff --git a/packages/database/e2e/onDisconnect/remove.e2e.js b/packages/database/e2e/onDisconnect/remove.e2e.js index 22fc36fa..ea911702 100644 --- a/packages/database/e2e/onDisconnect/remove.e2e.js +++ b/packages/database/e2e/onDisconnect/remove.e2e.js @@ -20,7 +20,6 @@ const { PATH, wipe } = require('../helpers'); const TEST_PATH = `${PATH}/onDisconnectRemove`; describe('database().ref().onDisconnect().remove()', () => { - after(() => wipe(TEST_PATH)); afterEach(() => { @@ -29,7 +28,10 @@ describe('database().ref().onDisconnect().remove()', () => { }); it('throws if onComplete is not a function', () => { - const ref = firebase.database().ref(TEST_PATH).onDisconnect(); + const ref = firebase + .database() + .ref(TEST_PATH) + .onDisconnect(); try { ref.remove('foo'); return Promise.reject(new Error('Did not throw an Error.')); @@ -40,7 +42,10 @@ describe('database().ref().onDisconnect().remove()', () => { }); it('removes a node whilst offline', async () => { - const ref = firebase.database().ref(TEST_PATH).child('removeMe'); + const ref = firebase + .database() + .ref(TEST_PATH) + .child('removeMe'); await ref.set('foobar'); @@ -54,7 +59,10 @@ describe('database().ref().onDisconnect().remove()', () => { it('calls back to the onComplete function', async () => { const callback = sinon.spy(); - const ref = firebase.database().ref(TEST_PATH).child('removeMe'); + const ref = firebase + .database() + .ref(TEST_PATH) + .child('removeMe'); // Set an initial value await ref.set('foo'); diff --git a/packages/database/e2e/onDisconnect/set.e2e.js b/packages/database/e2e/onDisconnect/set.e2e.js index 105b44e8..5f8a0f2d 100644 --- a/packages/database/e2e/onDisconnect/set.e2e.js +++ b/packages/database/e2e/onDisconnect/set.e2e.js @@ -15,12 +15,11 @@ * */ -const { PATH, seed, wipe } = require('../helpers'); +const { PATH, wipe } = require('../helpers'); const TEST_PATH = `${PATH}/onDisconnectSet`; describe('database().ref().onDisconnect().set()', () => { - after(() => wipe(TEST_PATH)); afterEach(() => { @@ -29,7 +28,10 @@ describe('database().ref().onDisconnect().set()', () => { }); it('throws if value is not a defined', () => { - const ref = firebase.database().ref(TEST_PATH).onDisconnect(); + const ref = firebase + .database() + .ref(TEST_PATH) + .onDisconnect(); try { ref.set(); return Promise.reject(new Error('Did not throw an Error.')); @@ -40,7 +42,10 @@ describe('database().ref().onDisconnect().set()', () => { }); it('throws if onComplete is not a function', () => { - const ref = firebase.database().ref(TEST_PATH).onDisconnect(); + const ref = firebase + .database() + .ref(TEST_PATH) + .onDisconnect(); try { ref.set(null, 'foo'); return Promise.reject(new Error('Did not throw an Error.')); diff --git a/packages/database/e2e/onDisconnect/setWithPriority.e2e.js b/packages/database/e2e/onDisconnect/setWithPriority.e2e.js index 3e14b1a9..b1101189 100644 --- a/packages/database/e2e/onDisconnect/setWithPriority.e2e.js +++ b/packages/database/e2e/onDisconnect/setWithPriority.e2e.js @@ -20,7 +20,6 @@ const { PATH, wipe } = require('../helpers'); const TEST_PATH = `${PATH}/onDisconnectSetWithPriority`; describe('database().ref().onDisconnect().setWithPriority()', () => { - after(() => wipe(TEST_PATH)); afterEach(() => { @@ -29,7 +28,10 @@ describe('database().ref().onDisconnect().setWithPriority()', () => { }); it('throws if value is not a defined', () => { - const ref = firebase.database().ref(TEST_PATH).onDisconnect(); + const ref = firebase + .database() + .ref(TEST_PATH) + .onDisconnect(); try { ref.setWithPriority(); return Promise.reject(new Error('Did not throw an Error.')); @@ -40,7 +42,10 @@ describe('database().ref().onDisconnect().setWithPriority()', () => { }); it('throws if priority is not a valid type', () => { - const ref = firebase.database().ref(TEST_PATH).onDisconnect(); + const ref = firebase + .database() + .ref(TEST_PATH) + .onDisconnect(); try { ref.setWithPriority(null, { foo: 'bar' }); return Promise.reject(new Error('Did not throw an Error.')); @@ -51,7 +56,10 @@ describe('database().ref().onDisconnect().setWithPriority()', () => { }); it('throws if onComplete is not a function', () => { - const ref = firebase.database().ref(TEST_PATH).onDisconnect(); + const ref = firebase + .database() + .ref(TEST_PATH) + .onDisconnect(); try { ref.setWithPriority(null, 1, 'foo'); return Promise.reject(new Error('Did not throw an Error.')); diff --git a/packages/database/e2e/onDisconnect/update.e2e.js b/packages/database/e2e/onDisconnect/update.e2e.js index 6be37caf..bfcaa4b5 100644 --- a/packages/database/e2e/onDisconnect/update.e2e.js +++ b/packages/database/e2e/onDisconnect/update.e2e.js @@ -79,9 +79,12 @@ describe('database().ref().onDisconnect().update()', () => { }, }); - await ref.child('foo').onDisconnect().update({ - bar: value, - }); + await ref + .child('foo') + .onDisconnect() + .update({ + bar: value, + }); await firebase.database().goOffline(); await firebase.database().goOnline(); diff --git a/packages/database/e2e/query/isEqual.e2e.js b/packages/database/e2e/query/isEqual.e2e.js index 4775ebb2..d67ffd32 100644 --- a/packages/database/e2e/query/isEqual.e2e.js +++ b/packages/database/e2e/query/isEqual.e2e.js @@ -37,14 +37,25 @@ describe('database().ref().isEqual()', () => { it('returns false if the query is different', async () => { const query = await firebase.database().ref(); - const other = await firebase.database().ref().limitToLast(2); + const other = await firebase + .database() + .ref() + .limitToLast(2); const same = query.isEqual(other); same.should.eql(false); }); it('returns true if the query is created differently', async () => { - const query = await firebase.database().ref().limitToFirst(1).orderByChild('foo'); - const other = await firebase.database().ref().orderByChild('foo').limitToFirst(1); + const query = await firebase + .database() + .ref() + .limitToFirst(1) + .orderByChild('foo'); + const other = await firebase + .database() + .ref() + .orderByChild('foo') + .limitToFirst(1); const same = query.isEqual(other); same.should.eql(true); }); diff --git a/packages/database/e2e/query/keepSynced.e2e.js b/packages/database/e2e/query/keepSynced.e2e.js index ae2849bd..e31ee246 100644 --- a/packages/database/e2e/query/keepSynced.e2e.js +++ b/packages/database/e2e/query/keepSynced.e2e.js @@ -30,7 +30,10 @@ describe('database().ref().keepSynced()', () => { }); it('toggles keepSynced on and off without throwing', async () => { - const ref = firebase.database().ref('noop').orderByValue(); + const ref = firebase + .database() + .ref('noop') + .orderByValue(); await ref.keepSynced(true); await ref.keepSynced(false); }); diff --git a/packages/database/e2e/query/on.e2e.js b/packages/database/e2e/query/on.e2e.js index c86e0f1e..bcb6f7ed 100644 --- a/packages/database/e2e/query/on.e2e.js +++ b/packages/database/e2e/query/on.e2e.js @@ -20,7 +20,6 @@ const { PATH } = require('../helpers'); const TEST_PATH = `${PATH}/on`; describe('database().ref().on()', () => { - it('throws if event type is invalid', async () => { try { await firebase diff --git a/packages/database/e2e/query/orderByPriority.e2e.js b/packages/database/e2e/query/orderByPriority.e2e.js index 58bd1565..e401f4cb 100644 --- a/packages/database/e2e/query/orderByPriority.e2e.js +++ b/packages/database/e2e/query/orderByPriority.e2e.js @@ -38,7 +38,10 @@ describe('database().ref().orderByPriority()', () => { }); it('order by priority', async () => { - const ref = firebase.database().ref(TEST_PATH).child('query'); + const ref = firebase + .database() + .ref(TEST_PATH) + .child('query'); await Promise.all([ ref.child('a').setPriority(2), @@ -47,9 +50,7 @@ describe('database().ref().orderByPriority()', () => { ]); try { - const snapshot = await ref - .orderByPriority() - .once('value'); + const snapshot = await ref.orderByPriority().once('value'); const expected = ['c', 'a', 'b']; diff --git a/packages/database/e2e/query/orderByValue.e2e.js b/packages/database/e2e/query/orderByValue.e2e.js index e7060ecd..42b3d40d 100644 --- a/packages/database/e2e/query/orderByValue.e2e.js +++ b/packages/database/e2e/query/orderByValue.e2e.js @@ -38,7 +38,10 @@ describe('database().ref().orderByValue()', () => { }); it('order by value', async () => { - const ref = firebase.database().ref(TEST_PATH).child('query'); + const ref = firebase + .database() + .ref(TEST_PATH) + .child('query'); await ref.set({ a: 2, @@ -47,9 +50,7 @@ describe('database().ref().orderByValue()', () => { }); try { - const snapshot = await ref - .orderByValue() - .once('value'); + const snapshot = await ref.orderByValue().once('value'); const expected = ['c', 'a', 'b']; diff --git a/packages/database/e2e/query/toJSON.e2e.js b/packages/database/e2e/query/toJSON.e2e.js index 1ea8b6e2..bb2fd796 100644 --- a/packages/database/e2e/query/toJSON.e2e.js +++ b/packages/database/e2e/query/toJSON.e2e.js @@ -16,11 +16,12 @@ */ describe('database().ref().toJSON()', () => { - it('returns a string version of the current query path', async () => { - const res = firebase.database().ref('foo/bar/baz').toJSON(); + const res = firebase + .database() + .ref('foo/bar/baz') + .toJSON(); const expected = `${firebase.database()._customUrlOrRegion}/foo/bar/baz`; should.equal(res, expected); }); - }); diff --git a/packages/database/e2e/reference/onDisconnect.e2e.js b/packages/database/e2e/reference/onDisconnect.e2e.js index 31875c00..dcb6a39d 100644 --- a/packages/database/e2e/reference/onDisconnect.e2e.js +++ b/packages/database/e2e/reference/onDisconnect.e2e.js @@ -19,7 +19,10 @@ describe('database().ref().onDisconnect()', () => { it('returns a new DatabaseOnDisconnect instance', () => { - const instance = firebase.database().ref().onDisconnect(); + const instance = firebase + .database() + .ref() + .onDisconnect(); instance.constructor.name.should.eql('DatabaseOnDisconnect'); }); }); diff --git a/packages/database/e2e/reference/push.e2e.js b/packages/database/e2e/reference/push.e2e.js index 677bed17..a18fe597 100644 --- a/packages/database/e2e/reference/push.e2e.js +++ b/packages/database/e2e/reference/push.e2e.js @@ -15,16 +15,12 @@ * */ -const { PATH, seed, wipe } = require('../helpers'); +// const { PATH, seed, wipe } = require('../helpers'); -const TEST_PATH = `${PATH}/push`; - -describe('database().ref().push()', () => { +// const TEST_PATH = `${PATH}/push`; +xdescribe('database().ref().push()', () => { // before(() => seed(TEST_PATH)); // after(() => wipe(TEST_PATH)); - - // TODO - }); diff --git a/packages/database/e2e/reference/set.e2e.js b/packages/database/e2e/reference/set.e2e.js index e14d6581..a6fc3b79 100644 --- a/packages/database/e2e/reference/set.e2e.js +++ b/packages/database/e2e/reference/set.e2e.js @@ -20,13 +20,15 @@ const { PATH, seed, wipe } = require('../helpers'); const TEST_PATH = `${PATH}/set`; describe('database().ref().set()', () => { - before(() => seed(TEST_PATH)); after(() => wipe(TEST_PATH)); it('throws if no value is provided', async () => { try { - await firebase.database().ref(TEST_PATH).set(); + await firebase + .database() + .ref(TEST_PATH) + .set(); return Promise.reject(new Error('Did not throw an Error.')); } catch (error) { error.message.should.containEql(`'value' must be defined`); @@ -36,7 +38,10 @@ describe('database().ref().set()', () => { it('throws if onComplete is not a function', async () => { try { - await firebase.database().ref(TEST_PATH).set(null, 'foo'); + await firebase + .database() + .ref(TEST_PATH) + .set(null, 'foo'); return Promise.reject(new Error('Did not throw an Error.')); } catch (error) { error.message.should.containEql(`'onComplete' must be a function if provided`); diff --git a/packages/database/e2e/reference/setPriority.e2e.js b/packages/database/e2e/reference/setPriority.e2e.js index 3453d086..05c5e007 100644 --- a/packages/database/e2e/reference/setPriority.e2e.js +++ b/packages/database/e2e/reference/setPriority.e2e.js @@ -20,13 +20,15 @@ const { PATH, CONTENT, seed, wipe } = require('../helpers'); const TEST_PATH = `${PATH}/priority`; describe('database().ref().setPriority()', () => { - before(() => seed(TEST_PATH)); after(() => wipe(TEST_PATH)); it('throws if priority is not a valid type', async () => { try { - await firebase.database().ref().setPriority({}); + await firebase + .database() + .ref() + .setPriority({}); return Promise.reject(new Error('Did not throw an Error.')); } catch (error) { error.message.should.containEql(`'priority' must be a number, string or null value`); @@ -36,7 +38,10 @@ describe('database().ref().setPriority()', () => { it('throws if onComplete is not a function', async () => { try { - await firebase.database().ref().setPriority(null, 'foo'); + await firebase + .database() + .ref() + .setPriority(null, 'foo'); return Promise.reject(new Error('Did not throw an Error.')); } catch (error) { error.message.should.containEql(`'onComplete' must be a function if provided`); diff --git a/packages/database/e2e/reference/setWithPriority.e2e.js b/packages/database/e2e/reference/setWithPriority.e2e.js index 86851bf1..02cc58b7 100644 --- a/packages/database/e2e/reference/setWithPriority.e2e.js +++ b/packages/database/e2e/reference/setWithPriority.e2e.js @@ -15,12 +15,11 @@ * */ -const { PATH, CONTENT, seed, wipe } = require('../helpers'); +const { PATH, seed, wipe } = require('../helpers'); const TEST_PATH = `${PATH}/setWithPriority`; describe('database().ref().setWithPriority()', () => { - before(() => seed(TEST_PATH)); after(() => wipe(TEST_PATH)); diff --git a/packages/database/e2e/reference/update.e2e.js b/packages/database/e2e/reference/update.e2e.js index 9b0eeb34..6ae7edb5 100644 --- a/packages/database/e2e/reference/update.e2e.js +++ b/packages/database/e2e/reference/update.e2e.js @@ -56,9 +56,12 @@ describe('database().ref().update()', () => { await firebase .database() .ref(`${PATH}/update`) - .update({ - foo: 'bar', - }, 'foo'); + .update( + { + foo: 'bar', + }, + 'foo', + ); return Promise.reject(new Error('Did not throw an Error.')); } catch (error) { error.message.should.containEql(`'onComplete' must be a function if provided`); diff --git a/packages/database/lib/DatabaseQuery.js b/packages/database/lib/DatabaseQuery.js index 7cb50434..24b79b2a 100644 --- a/packages/database/lib/DatabaseQuery.js +++ b/packages/database/lib/DatabaseQuery.js @@ -17,7 +17,6 @@ */ import { - isArray, isBoolean, isFunction, isNull, diff --git a/packages/database/lib/DatabaseReference.js b/packages/database/lib/DatabaseReference.js index 728906bd..ba02fb23 100644 --- a/packages/database/lib/DatabaseReference.js +++ b/packages/database/lib/DatabaseReference.js @@ -21,7 +21,7 @@ import { pathParent, pathChild, isValidPath, - generateDatabaseId, + // generateDatabaseId, isNumber, isNull, isUndefined, @@ -216,12 +216,7 @@ export default class DatabaseReference extends DatabaseQuery { }; // start the transaction natively - this._database._transaction.add( - this, - transactionUpdate, - onCompleteWrapper, - applyLocally - ); + this._database._transaction.add(this, transactionUpdate, onCompleteWrapper, applyLocally); }); } @@ -255,15 +250,15 @@ export default class DatabaseReference extends DatabaseQuery { * @param onComplete * @returns {DatabaseReference} */ - push(value, onComplete) { - // TODO validate value? - // - // const id = generateDatabaseId(this._database._serverTime); - // const pushRef = this.child(id); - // const thennablePushRef = this.child(id); - // - // return thennablePushRef; - } + // push(value, onComplete) { + // TODO validate value? + // + // const id = generateDatabaseId(this._database._serverTime); + // const pushRef = this.child(id); + // const thennablePushRef = this.child(id); + // + // return thennablePushRef; + // } /** * @url https://firebase.google.com/docs/reference/js/firebase.database.Reference#ondisconnect diff --git a/packages/database/lib/DatabaseTransaction.js b/packages/database/lib/DatabaseTransaction.js index 5f8a04e6..97ba9983 100644 --- a/packages/database/lib/DatabaseTransaction.js +++ b/packages/database/lib/DatabaseTransaction.js @@ -17,7 +17,6 @@ */ import NativeError from '@react-native-firebase/app/lib/internal/NativeFirebaseError'; -import DatabaseDataSnapshot from './DatabaseDataSnapshot'; let transactionId = 0; diff --git a/packages/database/lib/index.d.ts b/packages/database/lib/index.d.ts index 909768a2..92278d2d 100644 --- a/packages/database/lib/index.d.ts +++ b/packages/database/lib/index.d.ts @@ -364,8 +364,7 @@ export namespace Database { onDisconnect(): OnDisconnect; } - export interface ThenableReference extends Reference { - } + export interface ThenableReference extends Reference {} /** * A Query sorts and filters the data at a Database location so only a subset of the child data @@ -1154,7 +1153,7 @@ export namespace Database { * * @param enabled Whether debug logging is enabled. */ - setLoggingEnabled(enabled: boolean): void + setLoggingEnabled(enabled: boolean): void; /** * By default Firebase Database will use up to 10MB of disk space to cache data. If the cache grows beyond this size, @@ -1187,8 +1186,10 @@ declare module '@react-native-firebase/database' { import { ReactNativeFirebaseNamespace } from '@react-native-firebase/app-types'; const FirebaseNamespaceExport: {} & ReactNativeFirebaseNamespace; export const firebase = FirebaseNamespaceExport; - const DatabaseDefaultExport: ReactNativeFirebaseModuleAndStatics; + const DatabaseDefaultExport: ReactNativeFirebaseModuleAndStatics< + Database.Module, + Database.Statics + >; export default DatabaseDefaultExport; } diff --git a/packages/database/lib/index.js b/packages/database/lib/index.js index 1ba8edb2..7a83d59f 100644 --- a/packages/database/lib/index.js +++ b/packages/database/lib/index.js @@ -98,7 +98,7 @@ class FirebaseDatabaseModule extends FirebaseModule { throw new Error( `firebase.app().database().refFromURL(*) 'url' must be the same domain as the current instance (${ this._customUrlOrRegion - }). To use a different database domain, create a new Firebase instance.`, + }). To use a different database domain, create a new Firebase instance.`, ); } diff --git a/packages/database/lib/index.js.flow b/packages/database/lib/index.js.flow index 94aeea4d..219e031e 100644 --- a/packages/database/lib/index.js.flow +++ b/packages/database/lib/index.js.flow @@ -20,9 +20,7 @@ import type { ReactNativeFirebaseModule } from '@react-native-firebase/app-types export interface Statics {} -export interface Module extends ReactNativeFirebaseModule { - -} +export interface Module extends ReactNativeFirebaseModule {} declare module '@react-native-firebase/database' { import type {