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";
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
why | string | What was the law and what was the practice, and the days that matter. |
source | string | Where it is documented: a web page. |
sourceKind | "official" | "reference" | "encyclopedia" | What kind of page |
例
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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。