Reference · Flag source and framing metadata
FlagOnDaytype
The full answer for a day: the flag, variant (as variantOn gives it, with other and withheld), and where there is no drawing to
give none says why, in a sentence, never a bare null. For <hata-flag>, a page that must explain a blank, or a table of a country's history.
Import it
import type { FlagOnDay } from "@johnmorrisdotca/hata/manifest";
Definition
interface FlagOnDay {
date: string;
role: FlagRole;
variant: DatedVariant | null;
none: NoFlag | null;
}
Members
| Name | Type | Description |
|---|---|---|
date | string | The day asked, |
role | FlagRole | The role asked. |
variant | DatedVariant | null | The flag, or null. |
none | NoFlag | null | Why there is no drawing to give; null where there is one. |
Examples
import { flagOn, type FlagOnDay } from "@johnmorrisdotca/hata/manifest";
const day: FlagOnDay = flagOn("DE", "1940");
console.log(day.variant?.id); // "swastika-1935"
console.log(day.none?.kind); // "restricted"
console.log(flagOn("CA", "1850").none?.kind); // "not-yet"
console.log(flagOn("CA", "1962-09-29").none); // null: there is a flag to drawswastika-1935
restricted
not-yet
nullWhat it prints (run when this page was built)