UNPKG

minotor

Version:

A lightweight client-side transit routing library.

26 lines (25 loc) 716 B
export type SourceStopId = string; export type StopId = number; export type Platform = string; export type Latitude = number; export type Longitude = number; export type LocationType = 'SIMPLE_STOP_OR_PLATFORM' | 'STATION' | 'ENTRANCE_EXIT' | 'GENERIC_NODE' | 'BOARDING_AREA'; export type Stop = { id: StopId; sourceStopId: SourceStopId; name: string; lat?: Latitude; lon?: Longitude; children: StopId[]; parent?: StopId; locationType: LocationType; platform?: Platform; }; /** * Mapping internal StopIds to Stop objects. */ export type StopsMap = Map<StopId, Stop>; /** * Mapping source stopIds to internal stopIds; */ export type SourceStopsMap = Map<SourceStopId, StopId>;