diff --git a/packages/block/src/errors.ts b/packages/block/src/errors.ts index df98cda3f6..c12814bd59 100644 --- a/packages/block/src/errors.ts +++ b/packages/block/src/errors.ts @@ -1,5 +1,7 @@ import { UsageError, ValidationError } from '@ethereumjs/util' +import type { ValidationErrorType } from '@ethereumjs/util' + /** * Always define error codes on the generic Util * error class level (e.g. associated to `ValidationError`) @@ -12,10 +14,12 @@ export enum ValidationErrorCode { * Additional types extending the generic Util * error types (e.g. `ValidationErrorType`) */ -export type HeaderValidationErrorType = { - block: string - received: string -} +export type HeaderValidationErrorType = + | { + block: string + received: string + } + | ValidationErrorType export type HeaderUsageErrorType = { block: string }