From ad86644d8c98503d55a18dddb8c88f38a9fc3dc7 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 25 Sep 2026 17:35:27 -0700 Subject: [PATCH] Set custom error names in a way that esbuild will recognize. --- src/lib/errors.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/errors.ts b/src/lib/errors.ts index bfaa2c4..5d1f446 100644 --- a/src/lib/errors.ts +++ b/src/lib/errors.ts @@ -1,9 +1,12 @@ //! SPDX-FileCopyrightText: 2026 Chris Duncan //! SPDX-License-Identifier: GPL-3.0-or-later -export class Nano25519MutexError extends RangeError { name: string = 'Nano25519MutexError' } -export class Nano25519TypeError extends TypeError { name: string = 'Nano25519TypeError' } -export class Nano25519WasmError extends Error { name: string = 'Nano25519WasmError' } +export class Nano25519MutexError extends RangeError { } +Object.defineProperty(Nano25519MutexError, 'name', { value: 'Nano25519MutexError' }) +export class Nano25519TypeError extends TypeError { } +Object.defineProperty(Nano25519TypeError, 'name', { value: 'Nano25519TypeError' }) +export class Nano25519WasmError extends Error { } +Object.defineProperty(Nano25519WasmError, 'name', { value: 'Nano25519WasmError' }) /** * Message text for the codes in `src/assembly/errors.ts`. The numbers are the -- 2.52.0