Skip to main content

Type Alias: ShadingRule

ShadingRule = { class?: string; covers: TimeCover | readonly TimeCover[]; every?: never; hideWhenCoarserThan?: TimeUnit; } | { class?: string; covers: CoverPredicate; every: TimeUnit; hideWhenCoarserThan?: TimeUnit; }

Defined in: extensions/features/time-shading.ts:36

One shading rule. covers names one cover, a list ("covered when any of them covers" — a list means their union, and that is why there is no anyOf combinator), or a predicate asked once per every step.

every?: never on the first arm is load-bearing, not decorative. TypeScript's excess-property check runs against the whole union, not the matched member, so without it { covers: daysOfWeek(6, 7), every: 'day' } would compile with every silently ignored — a real bug an earlier draft shipped (2026-09-15). never refuses every on this arm whatever the other arm allows.