Make latlon geohash type definitions non ambient.

Add decode function to defintions.
This commit is contained in:
Oscar Lorentzon 2016-03-11 08:43:07 +01:00
parent 711d05bb5d
commit 17a0bcf62f
2 changed files with 13 additions and 14 deletions

View File

@ -5,7 +5,6 @@
},
"ambientDependencies": {
"graphlib": "file:typings/created/graphlib/graphlib.d.ts",
"latlon-geohash": "file:typings/created/latlon-geohash/latlon-geohash.d.ts",
"lib": "file:typings/created/lib/lib.d.ts",
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#aed176536a202b9a2475ce1989ea6d2d0226a185",
"rbush": "file:typings/created/rbush/rbush.d.ts",
@ -17,6 +16,7 @@
"when": "github:DefinitelyTyped/DefinitelyTyped/when/when.d.ts#001ca36ba58cef903c4c063555afb07bbc36bb58"
},
"dependencies": {
"latlon-geohash": "file:typings/created/latlon-geohash/latlon-geohash.d.ts",
"unitbezier": "file:./typings/created/unitbezier/unitbezier.d.ts"
}
}

View File

@ -1,15 +1,14 @@
declare module "latlon-geohash" {
export interface ILatLon {
lat: number;
lon: number;
}
export interface ILatLon {
lat: number;
lon: number;
}
export interface IBounds {
sw: ILatLon;
ne: ILatLon;
}
export interface IBounds {
sw: ILatLon;
ne: ILatLon;
}
export function neighbours(hash: string): {[key: string]: string};
export function encode(lat: number, lon: number, precision: number): string;
export function bounds(hash: string): IBounds;
}
export function neighbours(hash: string): {[key: string]: string};
export function encode(lat: number, lon: number, precision: number): string;
export function decode(hash: string): ILatLon;
export function bounds(hash: string): IBounds;