minotor
Version:
A lightweight client-side transit routing library.
20 lines (19 loc) • 1.01 kB
TypeScript
import { DateTime } from 'luxon';
export type ServiceId = string;
export type ServiceIds = Set<ServiceId>;
/**
* Parses a GTFS calendar.txt file and finds the service_ids of a given date.
*
* @param serviceIds A map of the active service ids (will be populated with active service_ids).
* @param date The active date.
* @param calendarStream A readable stream for the GTFS calendar.txt file.
*/
export declare const parseCalendar: (calendarStream: NodeJS.ReadableStream, serviceIds: ServiceIds, date: DateTime) => Promise<void>;
/**
* Parses a gtfs calendar_dates.txt file and finds the service ids valid at a given date.
*
* @param serviceIds A map of the active service ids (will be populated and filtered).
* @param date The active date, in the format "YYYYMMDD".
* @param calendarDatesStream A readable stream for the GTFS calendar_dates.txt file.
*/
export declare const parseCalendarDates: (calendarDatesStream: NodeJS.ReadableStream, serviceIds: ServiceIds, date: DateTime) => Promise<void>;