UNPKG

connection-scan-algorithm

Version:
32 lines (31 loc) 903 B
/// <reference types="node" /> import { Readable } from "stream"; import { TimeParser } from "./TimeParser"; import { StopID, StopIndex, Time } from "./Gtfs"; import { TimetableConnection } from "../journey/Connection"; import { Transfer } from ".."; /** * Returns trips, transfers, interchange time and calendars from a GTFS zip. */ export declare class GtfsLoader { private readonly timeParser; constructor(timeParser: TimeParser); load(input: Readable): Promise<GtfsData>; } /** * Transfers indexed by origin */ export declare type TransfersByOrigin = Record<StopID, Transfer[]>; /** * Index of stop to interchange time */ export declare type Interchange = Record<StopID, Time>; /** * Contents of the GTFS zip file */ export declare type GtfsData = { connections: TimetableConnection[]; transfers: TransfersByOrigin; interchange: Interchange; stops: StopIndex; };