Viewpointtype
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 it
import type { Viewpoint } from "@johnmorrisdotca/wakusei-planets/nearest";
Definition
type Viewpoint = BodyId | Observer;
Examples
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);venusWhat it prints (run when this page was built)