hspotlight / metro-fare

metro-fare.vercel.app
MIT License
14 stars 13 forks source link

Should rename some of variable to reduce confusion #14

Open thanakritju opened 4 years ago

thanakritju commented 4 years ago
export type TravelRoute = {
    route: {
        route: METRO_STATION[],
        lineType: LineType,
        fare: number
    }[],
    fare: number,
    source: METRO_STATION,
    destination: METRO_STATION,
}
export type RouteSegment = {
    route: METRO_STATION[],
    fareType: FareType
}

in this case should rename the first route to be routeSegments and re use route segment type.

hspotlight commented 4 years ago

Totally agree! The naming is poor, I need to rename many term in the code and also the label to be match be the term use in business to be more consistent (ubiquitous language in DDD 😎)