15 lines
541 B
TypeScript
15 lines
541 B
TypeScript
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 success type in the Result
|
|
* @template E - The error code type
|
|
*/
|
|
export interface UseCaseOutputPort<T, E extends string = string> {
|
|
present(result: Result<T, ApplicationErrorCode<E>>): any;
|
|
} |