import { JsonValue } from "../types/primitives"; /** * Base interface for ViewData objects * * All ViewData must be JSON-serializable for SSR. * This type ensures no class instances or functions are included. * * Note: We use 'any' here to allow complex DTO structures, but the * architectural rule is that these must be plain JSON objects. */ export interface ViewData { [key: string]: JsonValue; } /** * Helper type to ensure a type is ViewData-compatible * * Usage: * ```typescript * type MyViewData = ViewData & { * title: string; * count: number; * items: string[]; * }; * ``` */ export type ViewDataOf = T;