From c5e7b3f24e70a1d3fc75023d4fa5f0cbc274c0fa Mon Sep 17 00:00:00 2001 From: James Cook Date: Sat, 16 Sep 2023 20:05:39 +0100 Subject: [PATCH] fix: improve makeAuthedRequest types --- src/core/baseClient.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/baseClient.ts b/src/core/baseClient.ts index 8ba0286..9f4e93f 100644 --- a/src/core/baseClient.ts +++ b/src/core/baseClient.ts @@ -104,7 +104,8 @@ export class BaseClient { } } const request = await fetch(path, requestOptions); - let responseJSON: ClassChartsResponse; + // deno-lint-ignore no-explicit-any + let responseJSON: ClassChartsResponse; try { responseJSON = await request.json(); } catch { @@ -115,8 +116,7 @@ export class BaseClient { if (responseJSON.success == 0) { throw new Error(responseJSON.error); } - // deno-lint-ignore no-explicit-any - return responseJSON as unknown as any; + return responseJSON; } /** * Gets general information about the current student