defekt
Advanced tools
Comparing version 9.0.0 to 9.1.0
@@ -9,3 +9,3 @@ declare const ResultDoesNotContainError_base: import("./CustomErrorConstructor").CustomErrorConstructor<"ResultDoesNotContainError">; | ||
unwrapOrElse: (handleError: (error: Error) => TValue) => TValue; | ||
unwrapOrDefault: (defaultValue: TValue) => TValue; | ||
unwrapOrDefault: <TDefault = TValue>(defaultValue: TDefault) => TValue | TDefault; | ||
unwrapErrorOrThrow: () => TError; | ||
@@ -12,0 +12,0 @@ } |
@@ -0,1 +1,8 @@ | ||
# [9.1.0](https://github.com/thenativeweb/defekt/compare/9.0.0...9.1.0) (2022-03-24) | ||
### Features | ||
* Allow an arbitrary type as default in unwrapOrDefault. ([#359](https://github.com/thenativeweb/defekt/issues/359)) ([ff99448](https://github.com/thenativeweb/defekt/commit/ff99448913f48f68f55760970852a38475456f35)) | ||
# [9.0.0](https://github.com/thenativeweb/defekt/compare/8.2.0...9.0.0) (2022-03-23) | ||
@@ -2,0 +9,0 @@ |
@@ -11,3 +11,3 @@ import { defekt } from './defekt'; | ||
unwrapOrElse: (handleError: (error: Error) => TValue) => TValue; | ||
unwrapOrDefault: (defaultValue: TValue) => TValue; | ||
unwrapOrDefault: <TDefault = TValue>(defaultValue: TDefault) => TValue | TDefault; | ||
@@ -39,3 +39,3 @@ unwrapErrorOrThrow: () => TError; | ||
}, | ||
unwrapOrDefault (defaultValue: TValue): TValue { | ||
unwrapOrDefault <TDefault = TValue>(defaultValue: TDefault): TDefault { | ||
return defaultValue; | ||
@@ -42,0 +42,0 @@ }, |
{ | ||
"name": "defekt", | ||
"version": "9.0.0", | ||
"version": "9.1.0", | ||
"description": "defekt is custom errors made simple.", | ||
@@ -36,3 +36,3 @@ "contributors": [ | ||
"devDependencies": { | ||
"assertthat": "6.4.0", | ||
"assertthat": "6.5.1", | ||
"roboter": "13.0.0", | ||
@@ -39,0 +39,0 @@ "semantic-release-configuration": "2.0.7" |
51362