23 lines
575 B
TypeScript
23 lines
575 B
TypeScript
/**
|
|
* Presenter contract
|
|
*
|
|
* @deprecated Must use builders instead.
|
|
*
|
|
* Pure, deterministic transformation between presentation models.
|
|
*
|
|
* Based on PRESENTERS.md:
|
|
* - Deterministic
|
|
* - Side-effect free
|
|
* - No HTTP/API calls
|
|
* - Maps between Page DTO, ViewModel, and ViewData
|
|
*/
|
|
|
|
export interface Presenter<TInput, TOutput> {
|
|
/**
|
|
* Transform input to output
|
|
*
|
|
* @param input - The input presentation model (Page DTO, ViewModel, etc.)
|
|
* @returns The output presentation model (ViewModel, ViewData, etc.)
|
|
*/
|
|
present(input: TInput): TOutput;
|
|
} |