Reference · Flag source and framing metadata
VariantOptionstype
What variantsOf, variantOn and flagOn take: allowRestricted, to include the flags the law restricts (RESTRICTED); role, which flag of the day to give.
Import it
import type { VariantOptions } from "@johnmorrisdotca/hata/manifest";
Definition
interface VariantOptions {
role?: FlagRole;
allowRestricted?: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
role (optional) | FlagRole | undefined | Which flag of the day: the |
allowRestricted (optional) | boolean | undefined | Include a flag whose display the law restricts. Left out, it is never given: |
Examples
import { variantOn, type VariantOptions } from "@johnmorrisdotca/hata/manifest";
const asked: VariantOptions = { role: "in-use" };
console.log(variantOn("CA", "1962-09-29", asked)?.id); // "red-ensign-1957"red-ensign-1957What it prints (run when this page was built)