本文へ移動

Hoshi Stars星

肉眼で見える星の名前・色・距離、88星座の線と境界、メシエ天体、そしてそれらを描くための7種類の図法を使えます。

「星」(ほし) は、夜空に光って見えるものです。 名前について(英語)

目次

リファレンス · データの入口(自分で用意した星やディープスカイ天体を、ライセンスと出典つきのソースとして渡し、いま画面にあるのは誰のデータかを示します)

RecordsRead型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

What loadRecords found. skipped counts the records dropped for a non-finite number; a failed read has no records and says why.

インポート

import type { RecordsRead } from "@johnmorrisdotca/hoshi-stars/door";

定義

interface RecordsRead<R> {
    status: "ok" | "failed" | "aborted";
    records: readonly R[];
    skipped: number;
    reason?: string;
}

メンバー

名前型説明
status"ok" | "failed" | "aborted"
recordsreadonly R[]

Frozen. Empty unless the read succeeded.

skippednumber
reason (省略可)string | undefined

Why a read failed.

例

import type { RecordsRead } from "./data-door.ts";

const say = (read: RecordsRead<unknown>): string => `${read.status}: ${read.records.length} kept, ${read.skipped} skipped`;

ソースを見るGitHub で編集@johnmorrisdotca/hoshi-stars 0.47.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。