CountryProps型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What one country's outline carries: its English and Japanese name and its ISO alpha-2 code, all from kuni.
インポート
import type { CountryProps } from "@johnmorrisdotca/chikyu-earth";
定義
interface CountryProps {
name: string;
ja: string | null;
alpha2: string | null;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
name | string | English name, from kuni (Natural Earth's own name where kuni has no entry). |
ja | string | null | Japanese name, from kuni, or null. |
alpha2 | string | null | ISO 3166-1 alpha-2 code, from kuni, or null where there is no code. |
例
import { countryList, type CountryProps } from "@johnmorrisdotca/chikyu-earth";
const first: CountryProps | undefined = countryList()[0];
console.log(first?.name, first?.alpha2);Fiji FJ出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。