TagName型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The names a flag's tag can have: a closed list of the things a person sees on a flag. plain is flat fields of
colour with nothing drawn on them; emblem is any seal, badge, shield or device, a coat of arms included; a
Nordic cross is a cross too. docs/tags.md says when each applies.
インポート
import type { TagName } from "@johnmorrisdotca/hata/manifest";
ほかのエクスポート元: @johnmorrisdotca/hata/search
定義
type TagName = "plain" | "stripes-horizontal" | "stripes-vertical" | "stripes-diagonal" | "cross" | "nordic-cross" | "saltire" | "canton" | "stars" | "crescent" | "sun" | "circle" | "triangle" | "emblem" | "coat-of-arms" | "animal" | "plant" | "building" | "weapon" | "crown" | "map" | "text";
例
import { manifest, type TagName } from "@johnmorrisdotca/hata/manifest";
const names: TagName[] = (manifest("DE")?.tags ?? []).map((one) => one.tag);
console.log(names); // ["plain", "stripes-horizontal"][ 'plain', 'stripes-horizontal' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。