RecordSourcetype
A list that fits in memory (at most MAX_RECORDS records; bigger data must be tiles). It is read once, when the source is added. *
Import it
import type { RecordSource } from "@johnmorrisdotca/chikyu-earth/door";
Definition
interface RecordSource<R> {
kind: "records";
info: SourceInfo;
records(signal: AbortSignal): R[] | Promise<R[]>;
}
Members
| Name | Type | Description |
|---|---|---|
kind | "records" | |
info | SourceInfo | |
records | (signal: AbortSignal): R[] | Promise<R[]> |
Examples
import type { RecordSource } from "./data-door.ts";
declare const info: import("./data-door.ts").SourceInfo;
const source: RecordSource<{ id: string }> = { kind: "records", info, records: () => [{ id: "a" }] };