NearestOptionstype
Import it
import type { NearestOptions } from "@johnmorrisdotca/hoshi-stars/nearest";
Definition
interface NearestOptions {
count?: number;
within?: number;
kind?: "star" | "deep-sky";
by?: "sky" | "space";
date?: When;
magnitude?: number;
among?: readonly NearestThing[];
}
Members
| Name | Type | Description |
|---|---|---|
count (optional) | number | undefined | How many to return, nearest first (default 10; |
within (optional) | number | undefined | Only answers this near: degrees by angle, light-years by space. |
kind (optional) | "star" | "deep-sky" | undefined | What to look through: |
by (optional) | "sky" | "space" | undefined |
|
date (optional) | When | undefined | A moment: the stars are carried to it by their proper motion before the angles are measured. Precession turns every object the same way, so it does not change an angle. J2000 when left out. |
magnitude (optional) | number | undefined | The faintest to include, as in |
among (optional) | readonly NearestThing[] | undefined | Look through this list instead of the table that |
Examples
import { nearest, type NearestOptions } from "@johnmorrisdotca/hoshi-stars/nearest";
const options: NearestOptions = { count: 5, magnitude: 3 };
console.log(nearest("Sirius", options).map((found) => found.thing.name));[ 'Mirzam', 'Wezen', 'Adhara', 'Aludra', 'Saiph' ]What it prints (run when this page was built)