CustomFlagInfo型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A registered flag as a list shows it: the id, the names, the group, the width over the height and the source it came from. The drawing is customFlag(id).
インポート
import type { CustomFlagInfo } from "@johnmorrisdotca/hata/custom";
定義
interface CustomFlagInfo {
id: string;
name: {
en: string;
ja: string;
};
group: string;
aspect: number;
source: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string | |
name | { en: string; ja: string; } | |
group | string | |
aspect | number | |
source | string |
例
import type { CustomFlagInfo } from "@johnmorrisdotca/hata/custom";
const label = (flag: CustomFlagInfo): string => `${flag.id}: ${flag.name.en}`;
console.log(label({ id: "custom:a", name: { en: "A", ja: "A" }, group: "custom", aspect: 1.5, source: "mine" }));custom:a: A出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。