本文へ移動

Hata旗

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

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

目次

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

RoleNote型

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

Why a flag is only one of the two roles, with the page that says so: why, a sentence or two, and the source page of sourceKind (see Variant).

インポート

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

定義

interface RoleNote {
    why: string;
    source: string;
    sourceKind: "official" | "reference" | "encyclopedia";
}

メンバー

名前型説明
whystring

What was the law and what was the practice, and the days that matter.

sourcestring

Where it is documented: a web page.

sourceKind"official" | "reference" | "encyclopedia"

What kind of page source is: official, reference or encyclopedia.

例

import { variantsOf, type RoleNote } from "@johnmorrisdotca/hata/manifest";

const note: RoleNote | null = variantsOf("CA").find((one) => one.id === "red-ensign-1957")?.roleNote ?? null;
console.log(note?.sourceKind); // "official"
console.log(note?.source);     // "https://www.canada.ca/en/canadian-heritage/services/flag-canada-history.html"
official
https://www.canada.ca/en/canadian-heritage/services/flag-canada-history.html

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

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

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