diff --git a/src/errors.ts b/src/errors.ts index eda4169..41be0f2 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,3 +1,6 @@ +// get constructor parameters of Error +type ErrorOptions = ConstructorParameters[1]; + export class TsonError extends Error { constructor(message: string, opts?: ErrorOptions) { super(message, opts);