VariantOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What variantsOf, variantOn and flagOn take: allowRestricted, to include the flags the law restricts (RESTRICTED); role, which flag of the day to give.
インポート
import type { VariantOptions } from "@johnmorrisdotca/hata/manifest";
定義
interface VariantOptions {
role?: FlagRole;
allowRestricted?: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
role (省略可) | FlagRole | undefined | Which flag of the day: the |
allowRestricted (省略可) | boolean | undefined | Include a flag whose display the law restricts. Left out, it is never given: |
例
import { variantOn, type VariantOptions } from "@johnmorrisdotca/hata/manifest";
const asked: VariantOptions = { role: "in-use" };
console.log(variantOn("CA", "1962-09-29", asked)?.id); // "red-ensign-1957"red-ensign-1957出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。