Reference · Flags a page registers itself
CustomFlagSourcetype
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 it
import type { CustomFlagSource } from "@johnmorrisdotca/hata/custom";
Definition
type CustomFlagSource = RecordSource<CustomFlagRecord>;
Members
| Name | Type | Description |
|---|---|---|
kind | "records" | |
info | SourceInfo | |
records | (signal: AbortSignal): CustomFlagRecord[] | Promise<CustomFlagRecord[]> |
Examples
import type { CustomFlagSource } from "@johnmorrisdotca/hata/custom";
const names = (sources: CustomFlagSource[]): string[] => sources.map((source) => source.info.name.en);
console.log(names([]));[]What it prints (run when this page was built)