Skip to content

Commit 9779b67

Browse files
committed
Update return type of requestHref function to Promise<unknown>
1 parent afd2c65 commit 9779b67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shared/request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ export async function request(requestOptions: RequestOptions) {
7878
* This function is useful for following href links returned in API responses.
7979
* @param {string} href - The full href URL from a Blizzard API response.
8080
* @param {Record<string, string | number>} [qs] - Optional query string parameters to append.
81-
* @returns {Promise<any>} The parsed JSON response from the API.
81+
* @returns {Promise<unknown>} The parsed JSON response from the API.
8282
* @throws {APIError} If there is a problem fetching or the response is not successful.
8383
* @throws {AuthenticationError} (Potentially) If authentication fails during the process.
8484
*/
85-
export async function requestHref(href: string, qs?: Record<string, string | number>) {
85+
export async function requestHref(href: string, qs?: Record<string, string | number>): Promise<unknown> {
8686
if (
8787
!getauthConfig().accessToken || (getauthConfig().accessToken && getauthConfig().tokenExpiration &&
8888
new Date() < new Date(getauthConfig().tokenExpiration))

0 commit comments

Comments
 (0)