better-custom-error
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -6,2 +6,6 @@ All notable changes to this project will be documented in this file. | ||
## [4.0.3] - 2021-05-27 | ||
### Fixed | ||
- typings issue when instanceof with custom error would narrow to Error | ||
## [4.0.2] - 2021-05-27 | ||
@@ -8,0 +12,0 @@ ### Fixed |
@@ -9,4 +9,5 @@ declare type Names = (string | Names)[]; | ||
declare type Arg = Error | CustomError | string | Data | undefined | null; | ||
interface CustomErrorConstructor extends ErrorConstructor, CustomError { | ||
interface CustomErrorConstructor extends CustomError { | ||
new (arg1?: Arg, arg2?: Arg, arg3?: Arg): CustomError; | ||
(arg1?: Arg, arg2?: Arg, arg3?: Arg): CustomError; | ||
} | ||
@@ -13,0 +14,0 @@ interface Options { |
@@ -9,4 +9,5 @@ declare type Names = (string | Names)[]; | ||
declare type Arg = Error | CustomError | string | Data | undefined | null; | ||
interface CustomErrorConstructor extends ErrorConstructor, CustomError { | ||
interface CustomErrorConstructor extends CustomError { | ||
new (arg1?: Arg, arg2?: Arg, arg3?: Arg): CustomError; | ||
(arg1?: Arg, arg2?: Arg, arg3?: Arg): CustomError; | ||
} | ||
@@ -13,0 +14,0 @@ interface Options { |
{ | ||
"name": "better-custom-error", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"repository": "git@github.com:dzek69/better-custom-error.git", | ||
@@ -5,0 +5,0 @@ "author": "Jacek Nowacki @dzek69 <git-public@dzek.eu>", |
@@ -107,3 +107,2 @@ import { | ||
// @ts-expect-error overriding prototype, sorry TS | ||
CustomError.prototype = new ParentError(); | ||
@@ -110,0 +109,0 @@ return CustomError; |
@@ -20,4 +20,5 @@ type Names = (string | Names)[]; | ||
interface CustomErrorConstructor extends ErrorConstructor, CustomError { | ||
interface CustomErrorConstructor extends CustomError { | ||
new(arg1?: Arg, arg2?: Arg, arg3?: Arg): CustomError; | ||
(arg1?: Arg, arg2?: Arg, arg3?: Arg): CustomError; | ||
} | ||
@@ -24,0 +25,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
346979
4116