-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from thw0rted/master
Add TS typings + build improvements
- Loading branch information
Showing
8 changed files
with
361 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.js*] | ||
indent_size = 2 | ||
|
||
[*.{md,ts}] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
/.vscode/ | ||
/geotrans3.7/ | ||
*~ | ||
node_modules | ||
.DS_STORE | ||
coverage | ||
.nyc_output | ||
*.csv | ||
*.tgz | ||
geotrans3.7/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
declare module "mgrs" { | ||
/** | ||
* Convert lat/lon to MGRS. | ||
* | ||
* @param {[number, number]} ll Array with longitude and latitude on a | ||
* WGS84 ellipsoid. | ||
* @param {number} [accuracy=5] Accuracy in digits (5 for 1 m, 4 for 10 m, 3 for | ||
* 100 m, 2 for 1 km, 1 for 10 km or 0 for 100 km). Optional, default is 5. | ||
* @return {string} the MGRS string for the given location and accuracy. | ||
*/ | ||
export function forward(ll: [number,number], accuracy?: number): string; | ||
|
||
/** | ||
* Convert MGRS to lat/lon bounding box. | ||
* | ||
* @param {string} mgrs MGRS string. | ||
* @return {[number,number,number,number]} An array with left (longitude), | ||
* bottom (latitude), right | ||
* (longitude) and top (latitude) values in WGS84, representing the | ||
* bounding box for the provided MGRS reference. | ||
*/ | ||
export function inverse(mgrs: string): [number,number,number,number]; | ||
|
||
/** | ||
* Convert MGRS to lat/lon point. | ||
* | ||
* @param {string} mgrs MGRS string. | ||
* @return {[number,number]} An array with longitude and latitude values in | ||
* WGS84, representing the center point of the provided MGRS reference. | ||
*/ | ||
export function toPoint(mgrs: string): [number,number]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.