リファレンス · 検索ボックス用の名前の一覧 (明るい星とメシエ天体ごとに、英語・日本語の名前、符号、星座、順位の重み、アドレスに使える ID、向ける先を持つ行。IDと名前で引けます)
NameRow型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One row of the names index: a star or a deep-sky object with the names a search box would try, and where to turn the sky to it.
インポート
import type { NameRow } from "@johnmorrisdotca/hoshi-stars/names";
ほかのエクスポート元: @johnmorrisdotca/hoshi-stars/names/named, @johnmorrisdotca/hoshi-stars/names/ngc-ic
定義
interface NameRow {
id: string;
kind: NameKind;
detail: string;
name: {
en: string;
ja: string | undefined;
};
otherNames: string[];
designations: string[];
constellation: string | undefined;
constellationName: {
en: string;
ja: string;
} | undefined;
magnitude: number | undefined;
weight: number;
rightAscension: number;
declination: number;
pick: string;
hr: number | undefined;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string | An address-safe id that stays the same: lower-case letters, digits and hyphens ( |
kind | "star" | "other" | "galaxy" | "nebula" | "cluster" | What the row is. |
detail | string | More exactly what: the deep-sky object's own type ( |
name | { en: string; ja: string | undefined; } | The name to show: |
otherNames | string[] | Every other name and designation a reader might type, once each, in the spellings the package knows: for a star |
designations | string[] | The designations alone, as printed: |
constellation | string | undefined | The IAU abbreviation of the constellation it lies in ( |
constellationName | { en: string; ja: string; } | undefined | The constellation's name in English ( |
magnitude | number | undefined | Visual magnitude, or |
weight | number | A rank for ordering results, larger first: how bright the thing is (8 less its magnitude, between 0 and 14), plus 3 for a common name and 2 for a Messier number. Brighter and better-known things come first; it is not a measure of anything else. |
rightAscension | number | Right ascension in degrees at J2000, 0 up to 360. |
declination | number | Declination in degrees at J2000, -90 to 90. |
pick | string | The key the demo's address uses to pick it on the map ( |
hr | number | undefined | The Bright Star Catalogue (HR) number of a star, else |
例
import { nameRowById, type NameRow } from "@johnmorrisdotca/hoshi-stars/names";
const row: NameRow = nameRowById("betelgeuse")!;
console.log(row.name.en, row.name.ja, row.designations, row.pick);Betelgeuse ベテルギウス [ 'α Ori', 'HR 2061' ] S:2061出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。