@@ -44,38 +44,38 @@ export type VenueLocation = {
4444
4545export type LatLngTuple = [ number , number ] ;
4646
47- // export type BusStop = {
48- // location: LatLngTuple;
49- // // Human readable name for the stop
50- // readonly name: string;
51- // // Used for accessing the next bus API. This is called 'name' in the API.
52- // readonly code: string;
53- // // Bus routes that stops at the bus stop
54- // readonly routes: string[];
55- // // Whether to show the routes on the left instead of right
56- // // to avoid overlapping some other bus stop
57- // readonly displayRoutesLeft?: boolean;
58- // };
59-
60- // export type NextBusTime = number | '-' | 'Arr';
61-
62- // export type NextBus = {
63- // readonly arrivalTime: NextBusTime;
64- // readonly nextArrivalTime: NextBusTime;
65- // };
66-
67- // export type NextBusTimings = { [route: string]: NextBus };
47+ export type BusStop = {
48+ location : LatLngTuple ;
49+ // Human readable name for the stop
50+ readonly name : string ;
51+ // Used for accessing the next bus API. This is called 'name' in the API.
52+ readonly code : string ;
53+ // Bus routes that stops at the bus stop
54+ readonly routes : string [ ] ;
55+ // Whether to show the routes on the left instead of right
56+ // to avoid overlapping some other bus stop
57+ readonly displayRoutesLeft ?: boolean ;
58+ } ;
59+
60+ export type NextBusTime = number | '-' | 'Arr' ;
61+
62+ export type NextBus = {
63+ readonly arrivalTime : NextBusTime ;
64+ readonly nextArrivalTime : NextBusTime ;
65+ } ;
66+
67+ export type NextBusTimings = { [ route : string ] : NextBus } ;
6868
6969// data/venues.json is of this type
7070export type VenueLocationMap = { readonly [ key : string ] : VenueLocation } ;
7171
72- // export type BusTiming = {
73- // // Loading uses a boolean instead of making timings null so that
74- // // the old timing can be seen while it is refreshed
75- // isLoading: boolean;
76- // timings?: NextBusTimings | null;
77- // error?: Error | null;
78- // };
72+ export type BusTiming = {
73+ // Loading uses a boolean instead of making timings null so that
74+ // the old timing can be seen while it is refreshed
75+ isLoading : boolean ;
76+ timings ?: NextBusTimings | null ;
77+ error ?: Error | null ;
78+ } ;
7979
8080/**
8181 * Represents a time period in the timetable.
0 commit comments