mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 05:56:53 +00:00
fix(tours): keep the city walk helpers only their own files use inside them (CW-01, CW-03, CW-04)
The filter for a walk's stations in the planner, the opening windows of a walk's schedule and the station shape of a walk's progress were exported, although nothing outside their own file reads them, so the check for unused exports counted three more than it allows. They are local to their files now; a city walk plans, checks off and times its stops as before.
This commit is contained in:
@@ -19,7 +19,7 @@ export interface WalkTimes {
|
||||
}
|
||||
|
||||
/** The stations of a city walk: its points that are no shaping points. */
|
||||
export function stationsOf(points: readonly TourPlannerWaypoint[]): TourPlannerWaypoint[] {
|
||||
function stationsOf(points: readonly TourPlannerWaypoint[]): TourPlannerWaypoint[] {
|
||||
return points.filter((point) => !point.shaping);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ function daysOf(spec: string): Set<number> | null {
|
||||
}
|
||||
|
||||
/** The windows a place is open on a date, in minutes; null where the hours cannot be read. */
|
||||
export function openWindows(hours: string, date: string): Array<[number, number]> | null {
|
||||
function openWindows(hours: string, date: string): Array<[number, number]> | null {
|
||||
const weekday = weekdayOf(date);
|
||||
if (weekday === null) return null;
|
||||
const text = hours.trim();
|
||||
|
||||
@@ -111,7 +111,7 @@ export class TourVisitsService {
|
||||
}
|
||||
|
||||
/** CW-09: one station of a walk on a day, as an assistant reads it. */
|
||||
export interface WalkProgressStation {
|
||||
interface WalkProgressStation {
|
||||
position: number;
|
||||
name: string | null;
|
||||
lat: number;
|
||||
|
||||
Reference in New Issue
Block a user