Skip to content

Commit 9811ce9

Browse files
itsme-toMajored
authored andcommitted
Align APIError class with TypeScript Error compatibility
1 parent b4213d6 commit 9811ce9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/APIError.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ class APIError extends Error {
1515

1616
/** Returns the machine-readable code of the error.
1717
*
18-
* @returns {string} The machine-readable error code.
18+
* @type {string} The machine-readable error code.
1919
*/
20-
code() {
20+
get code() {
2121
return this.#code;
2222
}
2323

2424
/** Returns the human-readable message of the error.
2525
*
26-
* @returns {string} The human-readable error message.
26+
* @type {string} The human-readable error message.
2727
*/
28-
message() {
28+
get message() {
2929
return this.#message;
3030
}
3131

src/helpers/AlertsHelper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) 2021-2022 BuiltByBit (Mick Capital Pty. Ltd.)
22
// MIT License (https://github.com/BuiltByBit/js-api-wrapper/blob/main/LICENSE)
33

4+
const { SortOptions } = require("../SortOptions");
5+
46
/**
57
* @typedef {object} Alert
68
* @property {number} caused_member_id

0 commit comments

Comments
 (0)