Create Geocoder abstraction

This commit is contained in:
Matthew Oslan
2020-06-06 14:08:59 -04:00
parent 85433e6ce6
commit 4e65661a70
3 changed files with 45 additions and 22 deletions

View File

@@ -0,0 +1,11 @@
import { GeoCoordinates } from "../../types";
export abstract class Geocoder {
/**
* Converts a location name to geographic coordinates.
* @param location A location name.
* @return A Promise that will be resolved with the GeoCoordinates of the specified location, or rejected with a
* CodedError.
*/
public abstract geocodeLocation( location: string ): Promise<GeoCoordinates>;
}