ChizuGroup型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A named group of places: a continent, a UN M49 subregion, or any set of codes a page names (the countries of the
EU, Japan's Kanto region). The continents and subregions are CHIZU_CONTINENTS and CHIZU_SUBREGIONS; a map's own
groups are regionGroups(map); and any list of codes works with groupMap, groupBox and groupTones.
インポート
import type { ChizuGroup } from "@johnmorrisdotca/chizu";
定義
interface ChizuGroup {
code: string;
kind: "continent" | "subregion" | "region";
name: string;
nameJa?: string;
reading?: string;
aliases?: string[];
codes: string[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
code | string | Its code: |
kind | "continent" | "subregion" | "region" | What kind of group it is. |
name | string | |
nameJa (省略可) | string | undefined | |
reading (省略可) | string | undefined | How |
aliases (省略可) | string[] | undefined | Other names it goes by, in either language: Kansai and 関西 for Kinki. |
codes | string[] | The codes of the places in it, in order. |
例
import { CHIZU_SUBREGIONS } from "@johnmorrisdotca/chizu/names";
import type { ChizuGroup } from "@johnmorrisdotca/chizu";
const eastAsia: ChizuGroup = CHIZU_SUBREGIONS.find((group) => group.code === "030")!;
console.log(eastAsia.name, eastAsia.nameJa, eastAsia.codes.join(" "));
// Eastern Asia 東アジア CN HK JP KP KR MN MO TWEastern Asia 東アジア CN HK JP KP KR MN MO TW出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。