リファレンス · 場所:大陸の国と検索(サイズはすべての段階を含みます)
CityName型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A city in a country's light list (@johnmorrisdotca/kuni/cities/names-<code>): its id and names only, for a picker to show before it fetches the rest, and whether it is one of the country's major cities (its capital, or one of its first twenty, ranked by the urban area each heads).
インポート
import type { CityName } from "@johnmorrisdotca/kuni/places";
定義
interface CityName {
id: string;
name: {
en: string;
ja?: string;
jaShort?: string;
jaReading?: string;
native?: string;
};
major: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string | The city's id, as |
name | { en: string; ja?: string; jaShort?: string; jaReading?: string; native?: string; } | Its names, as |
major | boolean | True for the country's national capital and its first twenty cities. |
例
import type { CityName } from "@johnmorrisdotca/kuni/places";
const tokyo: CityName = { id: "Q1490", name: { en: "Tokyo", ja: "東京都", jaShort: "東京" }, major: true };
console.log(tokyo.name.jaShort);東京出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。