# types/page.types.ts

> 69 lines of code and 11 definitions.

Tree: Site tree
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/tree#file-types-page-types-ts
Source text: https://banes-lab.com/assets/sources/source.4bb3f7e4298630a1727dd2cddea89b9aa8e345392ea22c9b7ea314a22008b43c.generated.txt

## Definitions

- `PageRender` (type_alias_declaration, line 7, exported)
- `ClosingCell` (interface_declaration, line 9, exported)
- `HomeContent` (interface_declaration, line 14, exported)
- `TabbedContent` (interface_declaration, line 23, exported)
- `DocumentContent` (interface_declaration, line 31, exported)
- `PageContent` (type_alias_declaration, line 37, exported)
- `PageDefinition` (interface_declaration, line 39, exported)
- `PageLoader` (type_alias_declaration, line 49, exported)
- `PageEntry` (interface_declaration, line 51, exported)
- `PageHead` (interface_declaration, line 64, exported)
- `SchemaSubject` (interface_declaration, line 74, exported)

## Source

```typescript
import type { Closing, License } from "#types/site.types";
import type { DocumentMeta, Section, Tab, TabLayout, TabbedMeta } from "#types/document.types";
import type { HomeRowCopy, HomeStat } from "#types/home.types";
import type { PageShare, ShareImage } from "#types/card.types";
import type { SchemaEntity, SchemaGraph } from "#types/schema.types";

export type PageRender = () => Element;

export interface ClosingCell {
    readonly closing: Closing;
    readonly tail: readonly HTMLElement[];
}

export interface HomeContent {
    readonly heading: string;
    readonly kind: "home";
    readonly lead: string;
    readonly rows: readonly HomeRowCopy[];
    readonly stats: readonly HomeStat[];
    readonly thesis: string;
}

export interface TabbedContent {
    readonly kind: "tabbed";
    readonly layout: TabLayout;
    readonly meta: TabbedMeta;
    readonly tabs: readonly Tab[];
    readonly tone: string;
}

export interface DocumentContent {
    readonly kind: "document";
    readonly meta: DocumentMeta;
    readonly sections: readonly Section[];
}

export type PageContent = DocumentContent | HomeContent | TabbedContent;

export interface PageDefinition {
    readonly content: PageContent;
    readonly description: string;
    readonly entities?: readonly SchemaEntity[];
    readonly id: string;
    readonly license?: License;
    readonly render: PageRender;
    readonly title: string;
}

export type PageLoader = () => Promise<PageDefinition>;

export interface PageEntry {
    readonly accent: string;
    readonly description: string;
    readonly icon: string;
    readonly id: string;
    readonly listed: boolean;
    readonly load: PageLoader;
    readonly mark: string;
    readonly order: number;
    readonly share: PageShare;
    readonly title: string;
}

export interface PageHead {
    readonly banner: ShareImage;
    readonly description: string;
    readonly kind: string;
    readonly path: string;
    readonly robots: string;
    readonly schema: SchemaGraph;
    readonly title: string;
}

export interface SchemaSubject {
    readonly definition?: PageDefinition;
    readonly description: string;
    readonly path: string;
    readonly tab?: Tab;
    readonly title: string;
}
```
