RecordsReadtype
What loadRecords found. skipped counts the records dropped for a non-finite number; a failed read has no records and says why.
Import it
import type { RecordsRead } from "@johnmorrisdotca/hoshi-stars/door";
Definition
interface RecordsRead<R> {
status: "ok" | "failed" | "aborted";
records: readonly R[];
skipped: number;
reason?: string;
}
Members
| Name | Type | Description |
|---|---|---|
status | "ok" | "failed" | "aborted" | |
records | readonly R[] | Frozen. Empty unless the read succeeded. |
skipped | number | |
reason (optional) | string | undefined | Why a read failed. |
Examples
import type { RecordsRead } from "./data-door.ts";
const say = (read: RecordsRead<unknown>): string => `${read.status}: ${read.records.length} kept, ${read.skipped} skipped`;