wip
This commit is contained in:
3
packages/shared/application/AsyncUseCase.ts
Normal file
3
packages/shared/application/AsyncUseCase.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export interface AsyncUseCase<Input, Output> {
|
||||
execute(input: Input): Promise<Output>;
|
||||
}
|
||||
@@ -1,17 +1,5 @@
|
||||
import { Result } from '../result/Result';
|
||||
import type { Presenter } from '../presentation';
|
||||
|
||||
export interface IUseCase<Input, Output> {
|
||||
execute(input: Input): Output;
|
||||
}
|
||||
|
||||
export interface AsyncUseCase<Input, Output> {
|
||||
execute(input: Input): Promise<Output>;
|
||||
}
|
||||
|
||||
export interface ResultUseCase<Input, Output, Error = unknown> {
|
||||
execute(input: Input): Result<Output, Error>;
|
||||
}
|
||||
|
||||
export interface AsyncResultUseCase<Input, Output, Error = unknown> {
|
||||
execute(input: Input): Promise<Result<Output, Error>>;
|
||||
export interface UseCase<Input, OutputDTO, ViewModel, P extends Presenter<OutputDTO, ViewModel>> {
|
||||
execute(input: Input, presenter: P): Promise<void> | void;
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './UseCase';
|
||||
export * from './AsyncUseCase';
|
||||
export * from './Service';
|
||||
Reference in New Issue
Block a user