Viewpoint型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where the sky is seen from: a body's centre ("mars" for the sky of Mars), or a place on the Earth, whose parallax counts (the Moon is up to a degree different from there than from the Earth's centre). The default is the Earth's centre.
インポート
import type { Viewpoint } from "@johnmorrisdotca/wakusei-planets/nearest";
定義
type Viewpoint = BodyId | Observer;
例
import { nearest, type Viewpoint } from "@johnmorrisdotca/wakusei-planets/nearest";
const vancouver: Viewpoint = { latitude: 49.28, longitude: -123.12 };
console.log(nearest("moon", { observer: vancouver, count: 1, date: Date.UTC(2026, 10, 8) })[0]?.id);venus出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。