Skip to content

Commit

Permalink
fix(typescript): requestResource returns a Promise (#546)
Browse files Browse the repository at this point in the history
Closes #488
  • Loading branch information
roemba authored Nov 28, 2022
1 parent 666e065 commit 8bc9519
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ declare class BaseClient {
tokenType?: string;
DPoP?: DPoPInput;
},
): { body?: Buffer } & http.IncomingMessage;
): Promise<{ body?: Buffer } & http.IncomingMessage>;
grant(body: GrantBody, extras?: GrantExtras): Promise<TokenSet>;
introspect(
token: string,
Expand Down
4 changes: 2 additions & 2 deletions types/openid-client-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ async (req: IncomingMessage) => {
callbackResponse,
{ headers: { Accept: 'application/json' } },
);
console.log(resource.body.byteLength);
console.log(resource.body.toString('utf-8'));
console.log(resource.body!.byteLength);
console.log(resource.body!.toString('utf-8'));

//

Expand Down

0 comments on commit 8bc9519

Please sign in to comment.