NameRowtype
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 it
import type { NameRow } from "@johnmorrisdotca/hoshi-stars/names";
Also exported from: @johnmorrisdotca/hoshi-stars/names/named, @johnmorrisdotca/hoshi-stars/names/ngc-ic
Definition
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;
}
Members
| Name | Type | Description |
|---|---|---|
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 |
Examples
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:2061What it prints (run when this page was built)