Skip to content

Commit

Permalink
fix: additional type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
jenspots committed Mar 12, 2024
1 parent 95f39ea commit 3ee376e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/auth/oauth/password.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export class OAuth2PasswordAuth implements Auth {
}

// Append the access token to the original request.
const authData = await authResponse.json();
const authData = (await authResponse.json()) as {
access_token: string | undefined;
};
const token = authData["access_token"];

if (!token) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export function parseHeaders(headers: string[]): Headers {
}
result.append(key.trim(), value.trim());
});
return result;
return result as Headers; // Weird bug?
}

0 comments on commit 3ee376e

Please sign in to comment.