本文へ移動

Hata旗

国や地域の旗を読み込み、対応する表示の形を選び、絵ごとの資料・作者・ライセンスを保てます。

「旗(はた)」は、旗を表す日本語です。 名前について(英語)

目次

リファレンス · 旗の資料と表示の情報

OtherFlag型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The other flag of a day, in the role that was not asked for.

インポート

import type { OtherFlag } from "@johnmorrisdotca/hata/manifest";

定義

interface OtherFlag {
    role: FlagRole;
    id: string;
    name: string;
    nameJa: string;
    note: RoleNote | null;
}

メンバー

名前型説明
roleFlagRole

The role it has: in-use where the legal flag was asked for, and legal where the flag in use was.

idstring

Its id: ask for it with variantOn(code, date, { role }) or flag(code, { variant: id }).

namestring

Its name in English.

nameJastring

The same in Japanese.

noteRoleNote | null

The reason one was the law's and the other the practice, as its roleNote says; null where the package gives none.

例

import { variantOn, type OtherFlag } from "@johnmorrisdotca/hata/manifest";

const other: OtherFlag | null = variantOn("AU", "1930")?.other ?? null;
console.log(other?.id, other?.role); // "australian-national-flag" "in-use": the flag flown while the Union Flag was the legal one
australian-national-flag in-use

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/hata 1.31.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。