DirectionsState
Where the directions tool stands. Exactly one of these is true at a time.
This is a type alias exported by @mapcairn/map, checked against version 0.2.0.
Signature
import type { DirectionsState } from "@mapcairn/map";
type DirectionsState = {
readonly status: "idle";
} | {
readonly status: "loading";
readonly request: RoutingRequestKind;
readonly minutes?: number;
} | {
readonly status: "done";
readonly result: DirectionsOutcome;
} | {
readonly status: "error";
readonly request: RoutingRequestKind;
readonly kind: DirectionsFailure;
};
See also
Source: packages/map/src/tools/Directions/useDirections.ts:75