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

fix: infer error options to avoid type errors in environment that don't support it #59

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading