@povio/openapi-codegen-cli 2.0.8-rc.40 → 2.0.8-rc.41
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/generator.js +24 -24
- package/dist/lib/rest/error-handling.d.ts +3 -3
- package/dist/sh.js +80 -80
- package/package.json +1 -1
|
@@ -8,11 +8,11 @@ export declare class ApplicationException<CodeT> extends Error {
|
|
|
8
8
|
export interface ErrorEntry<CodeT> {
|
|
9
9
|
code: CodeT;
|
|
10
10
|
condition?: (error: unknown) => boolean;
|
|
11
|
-
getMessage: (t: TFunction, error: unknown) => string;
|
|
11
|
+
getMessage: (t: TFunction<string, undefined>, error: unknown) => string;
|
|
12
12
|
}
|
|
13
13
|
export interface ErrorHandlerOptions<CodeT extends string> {
|
|
14
14
|
entries: ErrorEntry<CodeT>[];
|
|
15
|
-
t?: TFunction
|
|
15
|
+
t?: TFunction<string, undefined>;
|
|
16
16
|
onRethrowError?: (error: unknown, exception: ApplicationException<CodeT | GeneralErrorCodes>) => void;
|
|
17
17
|
}
|
|
18
18
|
export declare class ErrorHandler<CodeT extends string> {
|
|
@@ -21,7 +21,7 @@ export declare class ErrorHandler<CodeT extends string> {
|
|
|
21
21
|
private onRethrowError?;
|
|
22
22
|
constructor({ entries, t, onRethrowError }: ErrorHandlerOptions<CodeT>);
|
|
23
23
|
private matchesEntry;
|
|
24
|
-
setTranslateFunction(t: TFunction): void;
|
|
24
|
+
setTranslateFunction(t: TFunction<string, undefined>): void;
|
|
25
25
|
rethrowError(error: unknown): ApplicationException<CodeT | GeneralErrorCodes>;
|
|
26
26
|
getError(error: unknown): ApplicationException<CodeT | GeneralErrorCodes> | null;
|
|
27
27
|
getErrorCode(error: unknown): CodeT | GeneralErrorCodes | null;
|