types/reference.types.ts
types/reference.types.ts is a file in Bane's Lab Site. 47 lines of code and 9 definitions.
import type { EdgeRef } from "#types/link.types";
export interface ReferenceRelation {
readonly edges: readonly EdgeRef[];
readonly relation: string;
}
export interface CheckView {
readonly authority: string | null;
readonly evidence: string | null;
readonly freshness: string | null;
readonly observation: string | null;
readonly population: string | null;
readonly refusal: string | null;
}
export interface RecordCheckView {
readonly answers: CheckView;
readonly by: readonly EdgeRef[];
readonly dependsOn: readonly EdgeRef[];
readonly shape: readonly EdgeRef[];
}
export interface CheckRow {
readonly edges: readonly EdgeRef[] | null;
readonly label: string;
readonly text: string;
}
export interface ReferenceRecord {
readonly check?: RecordCheckView;
readonly code: string | null;
readonly kind: string;
readonly layer: EdgeRef | null;
readonly name: string;
readonly relations: readonly ReferenceRelation[];
readonly summary: string | null;
}
export type ReferenceIndex = Readonly<Record<string, ReferenceRecord>>;
export interface ChapterReference {
readonly intro: string | null;
readonly principle: string | null;
readonly relations: readonly ReferenceRelation[];
readonly title: string;
}
export interface ReferenceTarget {
readonly face: string;
readonly ref: string;
}
export type ReferenceContent =
| { readonly chapter: ChapterReference; readonly kind: "chapter" }
| { readonly kind: "record"; readonly record: ReferenceRecord };