Comparing version 5.3.0 to 6.0.0
@@ -5,4 +5,4 @@ export interface CustomError extends Error { | ||
message: string; | ||
cause?: Error; | ||
cause?: unknown; | ||
data?: any; | ||
} |
import { CustomError } from './CustomError'; | ||
interface ErrorConstructor { | ||
new (message?: string, { cause, data }?: { | ||
cause?: Error; | ||
cause?: unknown; | ||
data?: any; | ||
@@ -6,0 +6,0 @@ }): CustomError; |
@@ -0,1 +1,13 @@ | ||
# [6.0.0](https://github.com/thenativeweb/defekt/compare/5.3.0...6.0.0) (2020-11-26) | ||
### Bug Fixes | ||
* Change type of cause to unknown. ([#222](https://github.com/thenativeweb/defekt/issues/222)) ([c79da3f](https://github.com/thenativeweb/defekt/commit/c79da3f0acb2595de65b345625d0485fb59faff1)) | ||
### BREAKING CHANGES | ||
* So far, `cause` was of type `Error`. Now it is of type `unknown`, which better represents the behavior of JavaScript and TypeScript. | ||
# [5.3.0](https://github.com/thenativeweb/defekt/compare/5.2.2...5.3.0) (2020-11-26) | ||
@@ -2,0 +14,0 @@ |
@@ -5,4 +5,4 @@ export interface CustomError extends Error { | ||
message: string; | ||
cause?: Error; | ||
cause?: unknown; | ||
data?: any; | ||
} |
@@ -22,3 +22,3 @@ import { CustomError } from './CustomError'; | ||
public cause?: Error; | ||
public cause?: unknown; | ||
@@ -34,3 +34,3 @@ public data?: any; | ||
}: { | ||
cause?: Error; | ||
cause?: unknown; | ||
data?: any; | ||
@@ -37,0 +37,0 @@ } = {}) { |
@@ -5,3 +5,3 @@ import { CustomError } from './CustomError'; | ||
new(message?: string, { cause, data }?: { | ||
cause?: Error; | ||
cause?: unknown; | ||
data?: any; | ||
@@ -8,0 +8,0 @@ }): CustomError; |
{ | ||
"name": "defekt", | ||
"version": "5.3.0", | ||
"version": "6.0.0", | ||
"description": "defekt is custom errors made simple.", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16631