リファレンス · 星・天体・位置の近くにあるもの (空と宇宙で)、隣り合う星座
NearestOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
インポート
import type { NearestOptions } from "@johnmorrisdotca/hoshi-stars/nearest";
定義
interface NearestOptions {
count?: number;
within?: number;
kind?: "star" | "deep-sky";
by?: "sky" | "space";
date?: When;
magnitude?: number;
among?: readonly NearestThing[];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
count (省略可) | number | undefined | How many to return, nearest first (default 10; |
within (省略可) | number | undefined | Only answers this near: degrees by angle, light-years by space. |
kind (省略可) | "star" | "deep-sky" | undefined | What to look through: |
by (省略可) | "sky" | "space" | undefined |
|
date (省略可) | 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 (省略可) | number | undefined | The faintest to include, as in |
among (省略可) | readonly NearestThing[] | undefined | Look through this list instead of the table that |
例
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' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。