From: Chris Duncan Date: Sat, 26 Sep 2026 00:35:27 +0000 (-0700) Subject: Set custom error names in a way that esbuild will recognize. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=ad86644d8c98503d55a18dddb8c88f38a9fc3dc7;p=nano25519.git Set custom error names in a way that esbuild will recognize. --- 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