mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-11 18:59:05 +00:00
fix: improve makeAuthedRequest types
This commit is contained in:
parent
dea1a00f13
commit
c5e7b3f24e
1 changed files with 3 additions and 3 deletions
|
|
@ -104,7 +104,8 @@ export class BaseClient {
|
|||
}
|
||||
}
|
||||
const request = await fetch(path, requestOptions);
|
||||
let responseJSON: ClassChartsResponse<unknown, unknown>;
|
||||
// deno-lint-ignore no-explicit-any
|
||||
let responseJSON: ClassChartsResponse<any, any>;
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue