From 8525def6418a2e71a632a874413fe88b69581a61 Mon Sep 17 00:00:00 2001 From: Michael Solati Date: Sun, 22 Jul 2018 17:38:08 -0700 Subject: [PATCH] refactor: modify how firestore is imported --- src/geofirestore.ts | 3 ++- src/interfaces/geoFirestoreObj.ts | 3 ++- src/interfaces/locationTracked.ts | 3 ++- src/interfaces/queryCriteria.ts | 3 ++- src/query.ts | 3 ++- src/utils.ts | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/geofirestore.ts b/src/geofirestore.ts index 2812ea8..45e194d 100644 --- a/src/geofirestore.ts +++ b/src/geofirestore.ts @@ -1,4 +1,5 @@ -import * as firebase from 'firebase'; +import * as firebase from 'firebase/app'; +import 'firebase/firestore'; import { GeoFirestoreQuery } from './query'; import { decodeGeoFirestoreObject, degreesToRadians, encodeGeoFireObject, encodeGeohash, validateLocation, validateKey, findCoordinatesKey } from './utils'; diff --git a/src/interfaces/geoFirestoreObj.ts b/src/interfaces/geoFirestoreObj.ts index 082b275..ab76ce3 100644 --- a/src/interfaces/geoFirestoreObj.ts +++ b/src/interfaces/geoFirestoreObj.ts @@ -1,4 +1,5 @@ -import * as firebase from 'firebase'; +import * as firebase from 'firebase/app'; +import 'firebase/firestore'; export interface GeoFirestoreObj { g: string; diff --git a/src/interfaces/locationTracked.ts b/src/interfaces/locationTracked.ts index 536395f..0dcde98 100644 --- a/src/interfaces/locationTracked.ts +++ b/src/interfaces/locationTracked.ts @@ -1,4 +1,5 @@ -import * as firebase from 'firebase'; +import * as firebase from 'firebase/app'; +import 'firebase/firestore'; export interface LocationTracked { distanceFromCenter: number; diff --git a/src/interfaces/queryCriteria.ts b/src/interfaces/queryCriteria.ts index a2c43e9..5b89155 100644 --- a/src/interfaces/queryCriteria.ts +++ b/src/interfaces/queryCriteria.ts @@ -1,4 +1,5 @@ -import * as firebase from 'firebase'; +import * as firebase from 'firebase/app'; +import 'firebase/firestore'; export interface QueryCriteria { center?: firebase.firestore.GeoPoint; diff --git a/src/query.ts b/src/query.ts index 54c1f96..a4c3397 100644 --- a/src/query.ts +++ b/src/query.ts @@ -1,4 +1,5 @@ -import * as firebase from 'firebase'; +import * as firebase from 'firebase/app'; +import 'firebase/firestore'; import { GeoFirestore } from './geofirestore'; import { GeoCallbackRegistration } from './callbackRegistration'; diff --git a/src/utils.ts b/src/utils.ts index d573084..b8cb6f0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,5 @@ -import * as firebase from 'firebase'; +import * as firebase from 'firebase/app'; +import 'firebase/firestore'; import { GeoFirestoreObj, QueryCriteria } from './interfaces';