Files
gridpilot.gg/apps/website/lib/contracts/presenters/Presenter.ts
2026-01-13 02:38:49 +01:00

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;
}