Reference · The Messier objects
DistanceValuetype
A length in the two units the package gives distances in.
Import it
import type { DistanceValue } from "@johnmorrisdotca/hoshi-stars/deep-sky";
Also exported from: @johnmorrisdotca/hoshi-stars/deep-sky/ngc-ic
Definition
interface DistanceValue {
lightYears: number;
parsecs: number;
}
Members
| Name | Type | Description |
|---|---|---|
lightYears | number | The length in light-years. |
parsecs | number | The length in parsecs. |
Examples
import { galaxyDistance, type DistanceValue } from "@johnmorrisdotca/hoshi-stars/deep-sky";
import { deepSkyObject } from "@johnmorrisdotca/hoshi-stars/deep-sky";
const away: DistanceValue = galaxyDistance(deepSkyObject("M31")!)!.spread.low;
console.log(away.lightYears, away.parsecs);2674482.297277295 820000What it prints (run when this page was built)