drimion 0.2.1 → 0.2.3
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.
package/dist/cli/index.js
CHANGED
package/dist/kernel/index.ts
CHANGED
|
@@ -7,8 +7,8 @@ import type { IResult } from "./result.types";
|
|
|
7
7
|
* @template Input The input type.
|
|
8
8
|
* @template Output The output type.
|
|
9
9
|
*/
|
|
10
|
-
export interface ICommand<Input = void, Output = void> {
|
|
11
|
-
execute(input: Input): Promise<IResult<Output,
|
|
10
|
+
export interface ICommand<Input = void, Output = void, Error = never> {
|
|
11
|
+
execute(input: Input): Promise<IResult<Output, Error>>;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -19,8 +19,8 @@ export interface ICommand<Input = void, Output = void> {
|
|
|
19
19
|
* @template Input The query parameters type.
|
|
20
20
|
* @template Output The returned data type.
|
|
21
21
|
*/
|
|
22
|
-
export interface IQuery<Input = void, Output = void> {
|
|
23
|
-
execute(input: Input): Promise<IResult<Output,
|
|
22
|
+
export interface IQuery<Input = void, Output = void, Error = never> {
|
|
23
|
+
execute(input: Input): Promise<IResult<Output, Error>>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -32,4 +32,8 @@ export interface IQuery<Input = void, Output = void> {
|
|
|
32
32
|
* @template Input The input type.
|
|
33
33
|
* @template Output The output type.
|
|
34
34
|
*/
|
|
35
|
-
export type IUseCase<Input = void, Output = void> = ICommand<
|
|
35
|
+
export type IUseCase<Input = void, Output = void, Error = never> = ICommand<
|
|
36
|
+
Input,
|
|
37
|
+
Output,
|
|
38
|
+
Error
|
|
39
|
+
>;
|