This commit is contained in:
2025-12-21 17:05:36 +01:00
parent 08b0d59e45
commit f2d8a23583
66 changed files with 1131 additions and 1342 deletions

View File

@@ -1,11 +1,15 @@
import type { Result } from './Result';
import type { ApplicationErrorCode } from '../errors/ApplicationErrorCode';
/**
* Output Port interface for use cases.
*
* Defines how the core communicates outward. A behavioral boundary that allows
* the use case to present results without knowing the presentation details.
*
* @template T - The result type to present
* @template T - The success type in the Result
* @template E - The error code type
*/
export interface UseCaseOutputPort<T> {
present(data: T): void;
export interface UseCaseOutputPort<T, E extends string = string> {
present(result: Result<T, ApplicationErrorCode<E>>): any;
}