]> git.codecow.com Git - nano25519.git/commitdiff
Set custom error names in a way that esbuild will recognize.
authorChris Duncan <chris@codecow.com>
Sat, 26 Sep 2026 00:35:27 +0000 (17:35 -0700)
committerChris Duncan <chris@codecow.com>
Sat, 26 Sep 2026 00:35:27 +0000 (17:35 -0700)
src/lib/errors.ts

index bfaa2c4656a2c1756c7ce573763d4a338d1a2de3..5d1f446547c6fc4ca09edea2e781399c5126d55d 100644 (file)
@@ -1,9 +1,12 @@
 //! SPDX-FileCopyrightText: 2026 Chris Duncan <chris@codecow.com>
 //! 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