NoFlag型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Why a day has no drawing to give, or none at all: the kind and a sentence. restricted: the law restricts the flag of that day and it is
withheld (the reason is the flag's own, in variant.restricted); not-yet: before the first flag the package dates for the place;
ended: after a former country's last year; gap: between two dated flags, a flag the package does not ship; other-role: the day has a flag
in the other role only; undated: the place has no dated flags (ask without a date); unknown: not a code with a flag here.
インポート
import type { NoFlag } from "@johnmorrisdotca/hata/manifest";
定義
interface NoFlag {
kind: "restricted" | "not-yet" | "ended" | "gap" | "other-role" | "undated" | "unknown";
reason: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
kind | "restricted" | "not-yet" | "ended" | "gap" | "other-role" | "undated" | "unknown" | |
reason | string |
例
import { flagOn, type NoFlag } from "@johnmorrisdotca/hata/manifest";
const none: NoFlag | null = flagOn("SUHH", "1992-01-01").none;
console.log(none?.kind); // "ended"
console.log(none?.reason); // "It had ended by 1992-01-01 (its years are 1922 to 1991)."ended
It had ended by 1992-01-01 (its years are 1922 to 1991).出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。