Create Geocoder abstraction
This commit is contained in:
11
routes/geocoders/Geocoder.ts
Normal file
11
routes/geocoders/Geocoder.ts
Normal 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>;
|
||||
}
|
||||
Reference in New Issue
Block a user