Exoplanettype
One confirmed planet, as the NASA Exoplanet Archive gives it.
Import it
import type { Exoplanet } from "@johnmorrisdotca/hoshi-stars/exoplanet-hosts";
Definition
interface Exoplanet {
name: string;
letter: string;
periodDays: number | undefined;
periodReference: string | undefined;
discoveryYear: number | undefined;
discoveryMethod: string;
}
Members
| Name | Type | Description |
|---|---|---|
name | string | The planet's name ( |
letter | string | The letter after the star's name ( |
periodDays | number | undefined | The orbital period in days, or |
periodReference | string | undefined | The paper the period is from ( |
discoveryYear | number | undefined | The year of discovery, or |
discoveryMethod | string | How it was found, in the Archive's words ( |
Examples
import { exoplanetHostByName, type Exoplanet } from "@johnmorrisdotca/hoshi-stars/exoplanet-hosts";
const b: Exoplanet = exoplanetHostByName("Proxima Centauri")!.planets[0]!;
console.log(b.name, b.periodDays, b.discoveryYear);Proxima Cen b 11.18465 2016What it prints (run when this page was built)