UNPKG

react-google-geocoding

Version:

A lightweight wrapper around Google Places Autocomplete and Directions APIs.

14 lines (13 loc) 716 B
import { Language, RegionCode } from "./types"; interface UseDirectionsResult { directions: google.maps.DirectionsResult | null; isLoading: boolean; status: keyof typeof google.maps.DirectionsStatus | null; } interface UseDirections extends Omit<google.maps.DirectionsRequest, "travelMode"> { language?: Language | null; region?: RegionCode | null; travelMode: keyof typeof google.maps.TravelMode; } declare const useDirections: ({ origin, destination, language, region, avoidFerries, avoidHighways, avoidTolls, drivingOptions, optimizeWaypoints, provideRouteAlternatives, transitOptions, unitSystem, waypoints, travelMode, }: UseDirections) => UseDirectionsResult; export { useDirections };