Skip to content

Commit 59b223f

Browse files
committed
Update TS types
1 parent ce74af6 commit 59b223f

File tree

8 files changed

+27
-6
lines changed

8 files changed

+27
-6
lines changed

types/APIError.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/** A type which represents a parsed error from the API, or an internal wrapper error. */
2+
export class APIError extends Error {
3+
/** Constructs a new Error which originated within the wrapper.
4+
*
5+
* @param {string} message The internal error message.
6+
* @returns {APIError} The newly-constructed error.
7+
*/
8+
static internal(message: string): APIError;
9+
constructor(json: any);
10+
/** Returns the machine-readable code of the error.
11+
*
12+
* @returns {string} The machine-readable error code.
13+
*/
14+
code(): string;
15+
/** Returns the human-readable message of the error.
16+
*
17+
* @returns {string} The human-readable error message.
18+
*/
19+
message(): string;
20+
#private;
21+
}
22+
//# sourceMappingURL=APIError.d.ts.map

types/APIError.d.ts.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

types/Http.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

types/Token.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ export class Token {
1515
};
1616
#private;
1717
}
18-
import { TokenType } from "./TokenType.js";
1918
//# sourceMappingURL=Token.d.ts.map

types/Token.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

types/Wrapper.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ export class Wrapper {
6060
http(): Http;
6161
#private;
6262
}
63-
import { Token } from "./Token.js";
6463
import { AlertsHelper } from "./helpers/AlertsHelper.js";
6564
import { ConversationsHelper } from "./helpers/ConversationsHelper.js";
6665
import { ThreadsHelper } from "./helpers/ThreadsHelper.js";

types/Wrapper.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const Token: typeof import("./Token.js").Token;
22
export const TokenType: typeof import("./TokenType.js").TokenType;
33
export const SortOptions: typeof import("./SortOptions.js").SortOptions;
44
export const Http: typeof import("./Http.js").Http;
5-
export const Error: typeof import("./Error.js").Error;
5+
export const APIError: typeof import("./APIError.js").APIError;
66
export const Wrapper: typeof import("./Wrapper.js").Wrapper;
77
export const AlertsHelper: typeof import("./helpers/AlertsHelper.js").AlertsHelper;
88
export const ConversationsHelper: typeof import("./helpers/ConversationsHelper.js").ConversationsHelper;

0 commit comments

Comments
 (0)