Reference · Flags a page registers itself
CustomFlagInfotype
A registered flag as a list shows it: the id, the names, the group, the width over the height and the source it came from. The drawing is customFlag(id).
Import it
import type { CustomFlagInfo } from "@johnmorrisdotca/hata/custom";
Definition
interface CustomFlagInfo {
id: string;
name: {
en: string;
ja: string;
};
group: string;
aspect: number;
source: string;
}
Members
| Name | Type | Description |
|---|---|---|
id | string | |
name | { en: string; ja: string; } | |
group | string | |
aspect | number | |
source | string |
Examples
import type { CustomFlagInfo } from "@johnmorrisdotca/hata/custom";
const label = (flag: CustomFlagInfo): string => `${flag.id}: ${flag.name.en}`;
console.log(label({ id: "custom:a", name: { en: "A", ja: "A" }, group: "custom", aspect: 1.5, source: "mine" }));custom:a: AWhat it prints (run when this page was built)