do to formatters
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
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.
|
||||
* Uncle Bob says: "Data structures should not have behavior."
|
||||
* ViewData is a dumb container for primitives and nested JSON only.
|
||||
*/
|
||||
export interface ViewData {
|
||||
[key: string]: JsonValue;
|
||||
[key: string]: any;
|
||||
}
|
||||
/**
|
||||
* Helper type to ensure a type is ViewData-compatible
|
||||
|
||||
Reference in New Issue
Block a user