Skip to content

Commit 94e442f

Browse files
committed
Refactor journey-draw and journey-model modules to simplify type definitions by removing unnecessary exports. Update mapping logic in journey-draw to enhance clarity and maintainability.
1 parent 5ead5b5 commit 94e442f

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/modules/journey-draw.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Journey SVG rendering (#journeys): delegates geometry/style to sibling modules.
33
*/
44
import type { Selection } from "d3";
5-
import type { JourneyResolvedStopEntry, PackJourney } from "./journey-model";
5+
import type { PackJourney } from "./journey-model";
66
import {
77
buildJourneyResolutionContext,
88
ensurePackJourneyNormalized,
@@ -146,7 +146,7 @@ export class JourneyDrawModule {
146146
this.lastLodTier = null;
147147
return;
148148
}
149-
const points = resolvedStops.map((r: JourneyResolvedStopEntry) => r.coord);
149+
const points = resolvedStops.map((r) => r.coord);
150150

151151
const zs = zoomScale;
152152
const zm = zoomMinForLod;

src/modules/journey-model.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
*/
44

55
/** One leg in the journey sequence (linked-list style via array order). */
6-
export interface JourneyBurgLeg {
6+
interface JourneyBurgLeg {
77
kind: "burg";
88
id: number;
99
}
1010

11-
export interface JourneyMarkerLeg {
11+
interface JourneyMarkerLeg {
1212
kind: "marker";
1313
id: number;
1414
}
@@ -210,7 +210,7 @@ export function resolveJourneyStopPosition(
210210
}
211211

212212
/** One resolved leg and its map coordinate (same order as `journeyResolvedCoordinates` points). */
213-
export interface JourneyResolvedStopEntry {
213+
interface JourneyResolvedStopEntry {
214214
leg: JourneyStopLeg;
215215
coord: [number, number];
216216
}

0 commit comments

Comments
 (0)