From 0b31b4e84b6f83b870715d5b0cfce411a2bb8935 Mon Sep 17 00:00:00 2001 From: Russell Steadman Date: Sun, 16 Apr 2023 08:54:26 -0400 Subject: [PATCH] Remove unnecessary type assertions --- src/model/covering.ts | 4 ++-- src/s2/s2-manager.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/model/covering.ts b/src/model/covering.ts index b6d855f..77940b0 100644 --- a/src/model/covering.ts +++ b/src/model/covering.ts @@ -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)); } diff --git a/src/s2/s2-manager.ts b/src/s2/s2-manager.ts index 1e4aac1..0c27f0d 100644 --- a/src/s2/s2-manager.ts +++ b/src/s2/s2-manager.ts @@ -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 => {