Function: supportsDurationAxis()
function supportsDurationAxis(unit: "flat" | "unit" | "year" | "month" | "day" | "hour" | "night" | "person"): boolean;Defined in: shared/pricing/types/actions.ts:106
Whether unit may carry a duration axis — the predicate form of
PER_ELIGIBLE_UNITS, exported so the tier modal's Duration
select can disable itself for an ineligible unit (PLA-279) without a
second copy of the eligible set.
The set itself stays private on purpose: a Set handed out is mutable
by any caller, and the UI only ever needs the question, not the
membership list. Keeping this the single source means a unit added to
the set is offered by the dialog in the same commit — the alternative,
a hand-maintained client-side list, is the drift TIME_SHAPED_UNITS
was already caught duplicating once (PLA-233 review).
Parameters
| Parameter | Type |
|---|---|
unit | "flat" | "unit" | "year" | "month" | "day" | "hour" | "night" | "person" |
Returns
boolean