Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Identity project noUnusedParameters, noImplicitReturns and noUnusedLocals tsconfig fixes #11453
Identity project noUnusedParameters, noImplicitReturns and noUnusedLocals tsconfig fixes #11453
Changes from 11 commits
3887399
432ba01
6dd2c86
f8fb6a8
5fb75dc
8dc31bb
17eacfb
e7f3426
5a08123
525feed
84d7f75
fbc0688
1c57627
18f18b6
afa3697
585a436
68efa0a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to choose
unknown
here instead of say inlining the type of the object containing the stdout, stderr and error?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently in
identity.api.md
the return type of this method isPromise<unknown>
and I was not sure if we should change the public API. Initially, I thought of setting it toPromise<any>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe changing from unknown to a strongly typed value especially in the output of a method should not be a breaking change. Doing so from
any
would be breaking though.cc @xirzec to confirm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review this commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking this conversation as unresolved to ensure we have input from @xirzec here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In-lining the type is better than
unknown
andany
, though a small type alias or interface would be even better. I'm good with the linked commit though.In this particular case, I wonder how much we have to worry about breaking changes for protected members. It seems like the only reason this method is protected is out of a misguided strategy for testing. We should be using something like sinon to mock out
getAzureCliAccessToken
instead of inheritance.If @jonathandturner is willing, perhaps we could make this private unless we really do anticipate developers to replace this implementation in their live apps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonathandturner This was added in #10994
Was curious as to how you envisioned this being used as it is currently unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohsin-mehmood Looks like the latest changes in the master branch do make use of the
authenticationRecord
. Can you pull in the changes from master and update the PR?