Files
gridpilot.gg/packages/shared/application/Service.ts
2025-12-11 13:50:38 +01:00

18 lines
511 B
TypeScript

import type { Result } from '../result/Result';
import type { IApplicationError } from '../errors/ApplicationError';
export interface IApplicationService {
readonly serviceName?: string;
}
export interface IAsyncApplicationService<Input, Output> extends IApplicationService {
execute(input: Input): Promise<Output>;
}
export interface IAsyncResultApplicationService<
Input,
Output,
Error = IApplicationError
> extends IApplicationService {
execute(input: Input): Promise<Result<Output, Error>>;
}