Skip to content
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

updates and improvements to TS typings #290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evanshortiss
Copy link
Contributor

@evanshortiss evanshortiss commented May 24, 2021

This PR add types to safely access to the underlying kauth object and read token data.

Edit: Let me know if I should open a JIRA.

feat: define return type for userInfo() call
chore: add missing properties to the Token interface/type
* req.kauth.grant.access_token?.content.name returns the user's name
*/
kauth: {
grant: KeycloakConnect.Grant
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The grant refers to properties such as grant.access_token. Will these always be defined? Current typings show them as possibly undefined (using the ? operator) as seen here.

Is it safe to remove the ? operator from those?

@edewit
Copy link
Contributor

edewit commented Jan 6, 2022

No need to open a JIRA we are using github issues now

@edewit edewit requested a review from ssilvert January 6, 2022 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants