Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
fix: infer error options to avoid type errors in environment that don…
Browse files Browse the repository at this point in the history
…'t support it (#59)
  • Loading branch information
KATT authored Oct 12, 2023
1 parent 13f0cfb commit 3f0ebb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// get constructor parameters of Error
type ErrorOptions = ConstructorParameters<typeof Error>[1];

export class TsonError extends Error {
constructor(message: string, opts?: ErrorOptions) {
super(message, opts);
Expand Down

0 comments on commit 3f0ebb6

Please sign in to comment.