ObjectSourcetype
A source of deep-sky objects: a list that fits in memory (at most 200,000 records), read once.
Import it
import type { ObjectSource } from "@johnmorrisdotca/hoshi-stars/door";
Definition
type ObjectSource = RecordSource<DeepSkyObject>;
Members
| Name | Type | Description |
|---|---|---|
kind | "records" | |
info | SourceInfo | |
records | (signal: AbortSignal): DeepSkyObject[] | Promise<DeepSkyObject[]> |
Examples
import type { ObjectSource } from "@johnmorrisdotca/hoshi-stars/door";
const count = async (source: ObjectSource): Promise<number> => (await source.records(new AbortController().signal)).length;
console.log(typeof count);functionWhat it prints (run when this page was built)