framework-do-dede 3.0.14 → 3.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,15 +15,15 @@ export interface TracerData {
|
|
|
15
15
|
error?: any;
|
|
16
16
|
headers: Record<string, string>;
|
|
17
17
|
}
|
|
18
|
-
export interface Tracer {
|
|
19
|
-
trace(data: TracerData):
|
|
18
|
+
export interface Tracer<R> {
|
|
19
|
+
trace(data: TracerData): R;
|
|
20
20
|
}
|
|
21
21
|
export interface Input<T, K = any> {
|
|
22
22
|
data: T;
|
|
23
23
|
context?: K;
|
|
24
24
|
}
|
|
25
25
|
export declare function Controller(basePath?: string): (target: any) => void;
|
|
26
|
-
export declare function Tracing(tracer: Tracer): (target: any, propertyKey?: string) => void;
|
|
26
|
+
export declare function Tracing<R>(tracer: Tracer<R>): (target: any, propertyKey?: string) => void;
|
|
27
27
|
export declare function getControllers(): any[];
|
|
28
28
|
export declare function flushControllers(): void;
|
|
29
29
|
export declare function UseMiddleware(middlewareClass: new (...args: any[]) => Middleware): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
@@ -3,7 +3,7 @@ export declare const USE_CASE_DECORATORS: unique symbol;
|
|
|
3
3
|
export declare abstract class UseCase<UseCaseInput, UseCaseOutput, UseCaseContext = any> {
|
|
4
4
|
protected readonly data?: UseCaseInput;
|
|
5
5
|
protected readonly context?: UseCaseContext;
|
|
6
|
-
|
|
6
|
+
constructor(input?: Input<UseCaseInput>);
|
|
7
7
|
abstract execute(): Promise<UseCaseOutput>;
|
|
8
8
|
}
|
|
9
9
|
export declare function DecorateUseCase(useCases: UseCase<any, any> | (new (...args: any[]) => UseCase<any, any>) | Array<UseCase<any, any> | (new (...args: any[]) => UseCase<any, any>)>): ClassDecorator;
|