diff --git a/types/ngeohash/index.d.ts b/types/ngeohash/index.d.ts index 25c8f29e5b..af498162ce 100644 --- a/types/ngeohash/index.d.ts +++ b/types/ngeohash/index.d.ts @@ -12,7 +12,7 @@ declare namespace ngeohash { type GeographicBoundingBox = [number, number, number, number]; type NSEW = [number, number]; - function encode(latitude: number, longitude: number, precision?: number): string; + function encode(latitude: number|string, longitude: number|string, precision?: number): string; function decode(hashstring: string): GeographicPoint; function decode_bbox(hashstring: string): GeographicBoundingBox; function bboxes(minlat: number, minlon: number, maxlat: number, maxlon: number, precision?: number): Array; diff --git a/types/ngeohash/ngeohash-tests.ts b/types/ngeohash/ngeohash-tests.ts index 34ad34d7cf..5c77ae94df 100644 --- a/types/ngeohash/ngeohash-tests.ts +++ b/types/ngeohash/ngeohash-tests.ts @@ -1,6 +1,7 @@ import geohash = require('ngeohash'); console.log(geohash.encode(37.8324, 112.5584)); +console.log(geohash.encode('37.8324', '112.5584')); // prints ww8p1r4t8 var latlon = geohash.decode('ww8p1r4t8');