Skip to content

Commit

Permalink
Remove unnecessary type assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
russellsteadman committed Apr 16, 2023
1 parent cb5ce20 commit 0b31b4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/model/covering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export class Covering {
const ranges: GeohashRange[] = [];
for (const outerRange of this.cellIds) {
const hashRange = new GeohashRange(
outerRange.rangeMin().id as Long,
outerRange.rangeMax().id as Long,
outerRange.rangeMin().id,
outerRange.rangeMax().id,
);
ranges.push(...hashRange.trySplit(hashKeyLength));
}
Expand Down
2 changes: 1 addition & 1 deletion src/s2/s2-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const generateGeohash = (geoPoint: GeoPoint): Long => {
const latLng = S2LatLng.fromDegrees(geoPoint.latitude, geoPoint.longitude);
const cell = S2Cell.fromLatLng(latLng);
const cellId = cell.id;
return cellId.id as Long;
return cellId.id;
};

export const generateHashKey = (geohash: Long, hashKeyLength: number): Long => {
Expand Down

0 comments on commit 0b31b4e

Please sign in to comment.