import { Leg } from "./Leg"; import { TimetableLeg } from "./TimetableLeg"; import { LocalDate } from "js-joda"; /** * A journey from A to B consisting of one or more legs */ export declare class Journey { readonly legs: Leg[]; readonly departureDate: LocalDate; readonly departureTime: Time; readonly arrivalTime: Time; constructor(legs: Leg[], departureDate: LocalDate, departureTime: Time, arrivalTime: Time); /** * Origin is the origin of the journey is the origin first leg */ readonly origin: Stop; /** * Destination of the journey is the destination of the last leg */ readonly destination: Stop; /** * The duration of the journey in seconds */ readonly duration: Duration; /** * Return the stopping pattern for the journey */ readonly stops: Stop[]; /** * Return the timetable legs for the journey */ readonly timetableLegs: TimetableLeg[]; /** * Create an id for the journey by joining the service IDs */ readonly id: string; } /** * Stop code, e.g. CHX */ export declare type Stop = string; /** * Time of day in seconds */ export declare type Time = number; /** * Duration in seconds */ export declare type Duration = number;