Skip to content

Commit

Permalink
Fixed types for Output formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Kużyński committed Mar 30, 2023
1 parent f7b7815 commit 012af04
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pallad/error-mapper",
"version": "1.0.0",
"version": "1.0.1",
"description": "Generic error mapper",
"main": "compiled/index.js",
"types": "compiled/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/ErrorMapperBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class ErrorMapperBuilder<TOutput extends ErrorOutput> extends Builder {
},
mappingResult ?? {
message: err instanceof Error ? err.message : 'Unknown error'
}
} as TOutput
) as TOutput;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/OutputTransformer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {ErrorOutput} from "./ErrorOutput";

export interface OutputTransformer<TOutput extends ErrorOutput> {
(output: ErrorOutput, error: unknown, meta: OutputTransformer.Meta): ErrorOutput;
(output: TOutput, error: unknown, meta: OutputTransformer.Meta): TOutput;
}

export namespace OutputTransformer {
Expand Down

0 comments on commit 012af04

Please sign in to comment.