ColourName型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The names a flag's colour can have: a closed list of the words a person uses of a flag ("red, white and blue"). Two
blues are both blue, and the hex says which; light-blue is the sky blue of Argentina's flag or the United Nations'.
インポート
import type { ColourName } from "@johnmorrisdotca/hata/manifest";
ほかのエクスポート元: @johnmorrisdotca/hata/search
定義
type ColourName = "red" | "orange" | "yellow" | "green" | "light-blue" | "blue" | "purple" | "brown" | "black" | "grey" | "white";
例
import { manifest, type ColourName } from "@johnmorrisdotca/hata/manifest";
const names: ColourName[] = (manifest("FR")?.colours ?? []).map((one) => one.name);
console.log(names); // ["blue", "red", "white"][ 'blue', 'red', 'white' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。