Skip to content

Documentation / @interstellar-tools/types / CelestialBodyType

Type Alias: CelestialBodyType ​

ts
type CelestialBodyType =
  | StarInterface
  | PlanetInterface
  | MoonInterface
  | CometInterface
  | AsteroidInterface;

Defined in: celestial-bodies/celestial-bodies.ts:39

Type alias representing a single celestial body.

Includes:

  • Stars (StarInterface)
  • Planets (PlanetInterface)
  • Moons (MoonInterface)
  • Comets (CometInterface)

Example ​

ts
const describe = (body: CelestialBodyType) =>
  `${body.name}, bound to ${body.parent}`;