Skip to content
18 linesCodeBlameRaw
1/**
2 * The kinds the room knows, one line each. A kind without a line here can't
3 * be made yet: the service says it is coming. Append only; never reformat
4 * (parallel phases each add their line).
5 */
6import type { FolioKind } from "@g1t/contracts";
7
8import { doc } from "./doc/index.ts";
9import type { KindModel } from "./types.ts";
10
11export const KINDS: Partial<Record<FolioKind, KindModel>> = {
12 doc,
13};
14
15/** The kind's model, or null when it isn't built yet. */
16export function kindModel(kind: string | null | undefined): KindModel | null {
17 return (KINDS as Record<string, KindModel | undefined>)[String(kind ?? "")] ?? null;
18}