TenkaTerritoryData型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One territory as the map script writes it: neighbours by land and by sea are indices into the same list.
インポート
import type { TenkaTerritoryData } from "@johnmorrisdotca/tenka";
定義
type TenkaTerritoryData = {
key: string;
name: string;
continent: TenkaContinentKey;
land: readonly number[];
sea: readonly number[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
key | string | |
name | string | |
continent | TenkaContinentKey | |
land | readonly number[] | |
sea | readonly number[] |
例
import type { TenkaTerritoryData } from "@johnmorrisdotca/tenka";
import { TENKA_MAPS } from "@johnmorrisdotca/tenka";
const value: TenkaTerritoryData = TENKA_MAPS.world.territories[0];
console.log(value);{
key: 'alaska',
name: 'Alaska',
continent: 'northAmerica',
land: [ 1, 3 ],
sea: [ 29 ]
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。