8000 Fix types for overloaded verify method by stevehobbsdev · Pull Request #145 · auth0/idtoken-verifier · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix types for overloaded verify method #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 15, 2021
Merged

Conversation

stevehobbsdev
Copy link
Contributor

Changes

This PR corrects the types for the overloaded verify method. Currently the types are generated incorrectly thanks to an open issue in TypeScript.

As a result, this PR also temporarily turns of automatic types generation.

References

#144

Testing

  • This change adds test coverage

Checklist

@stevehobbsdev stevehobbsdev requested a review from a team as a code owner October 15, 2021 10:45
@@ -93,7 +95,22 @@ declare class IdTokenVerifier {
* @param {string} [requestedNonce] nonce value that should match the one in the id_token claims
* @param {verifyCallback} cb callback used to notify the results of the validation
*/
verify(token: string, requestedNonce?: string, cb: verifyCallback): any;
verify(token: string, requestedNonce: string, cb: verifyCallback): any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevehobbsdev if requestedNonce is no longer optional, shouldn't the param doc line above stop using the [ ... ] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - good catch, I'll amend it. Thanks!

@stevehobbsdev stevehobbsdev requested review from lbalmaceda and a team October 15, 2021 12:46
@stevehobbsdev stevehobbsdev merged commit 37a22d6 into master Oct 15, 2021
@stevehobbsdev stevehobbsdev deleted the chore/fix-types branch October 15, 2021 12:57
@stevehobbsdev stevehobbsdev mentioned this pull request Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0