This is the documentation of version 0.58.1. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias LegCostModel

    LegCostModel: Pick<CostModel, "routeType" | "avoid">

    Cost model overrides that apply to a single leg of a route.

    A subset of CostModel: only the route type and the avoid list can vary per leg. Traffic, avoid areas and departure time are route-wide.