Skip to content

Commit e51d5b4

Browse files
committed
fix build, grossly
1 parent b1ba766 commit e51d5b4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

firestore-next/test.firestore.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// [SNIPPETS_SEPARATION enabled]
33

44
const { expect } = require('chai');
5+
import { or } from "firebase/firestore";
56

67
// [START city_custom_object]
78
class City {

firestore-next/test.solution-geoqueries.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ async function addHash(done) {
2929
done();
3030
}
3131

32+
// tsc complains `center` can have more or fewer than 2 elements, but
33+
// since this is a js file there's no way of more accurately specifying
34+
// `center`'s type.
3235
async function queryHashes(done) {
3336
// [START fs_geo_query_hashes]
3437
const { collection, query, orderBy, startAt, endAt, getDocs } = require('firebase/firestore');
@@ -40,6 +43,7 @@ async function queryHashes(done) {
4043
// Each item in 'bounds' represents a startAt/endAt pair. We have to issue
4144
// a separate query for each pair. There can be up to 9 pairs of bounds
4245
// depending on overlap, but in most cases there are 4.
46+
// @ts-ignore
4347
const bounds = geofire.geohashQueryBounds(center, radiusInM);
4448
const promises = [];
4549
for (const b of bounds) {
@@ -63,6 +67,7 @@ async function queryHashes(done) {
6367

6468
// We have to filter out a few false positives due to GeoHash
6569
// accuracy, but most will match
70+
// @ts-ignore
6671
const distanceInKm = geofire.distanceBetween([lat, lng], center);
6772
const distanceInM = distanceInKm * 1000;
6873
if (distanceInM <= radiusInM) {

0 commit comments

Comments
 (0)