CustomFlagSource型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A set of flags handed in by a page: a records source of the family's data door, whose info says whose they are (id, names, credit, licence, page, day) and whose records() gives the flags.
インポート
import type { CustomFlagSource } from "@johnmorrisdotca/hata/custom";
定義
type CustomFlagSource = RecordSource<CustomFlagRecord>;
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
kind | "records" | |
info | SourceInfo | |
records | (signal: AbortSignal): CustomFlagRecord[] | Promise<CustomFlagRecord[]> |
例
import type { CustomFlagSource } from "@johnmorrisdotca/hata/custom";
const names = (sources: CustomFlagSource[]): string[] => sources.map((source) => source.info.name.en);
console.log(names([]));[]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。