ElementSource型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Element sets read from a source: where from, when, and whether this answer was kept from earlier rather than asked for now.
インポート
import type { ElementSource } from "@johnmorrisdotca/chikyu-earth/satellites";
定義
interface ElementSource extends ParsedElements {
url: string;
retrievedAt: number;
fromCache: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
url | string | |
retrievedAt | number | When the source was asked, in milliseconds since the Unix epoch. |
fromCache | boolean | |
format | ElementFormat | |
sets | ElementSet[] | |
skipped | { name: string; reason: string; }[] |
例
import type { ElementSource } from "@johnmorrisdotca/chikyu-earth/satellites";
const describe = (source: ElementSource): string => `${source.sets.length} from ${source.url}, ${source.fromCache ? "kept" : "new"}`;
console.log(typeof describe);function出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。