feat!: Normalize GoogleAuth<T>
from JSONClient
to AuthClient
#1940
+67
−25
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.
Description
Improve a long-open pain-point for customers by setting the default AuthClient generic in GoogleAuth to
AuthClient
:GoogleAuth<T>
toAuthClient
#1677This improves the default compatibly between
GoogleAuth
instances as they would all be compatible by default (givenAuthClient
is the base type of allAuthClients
)Impact
A few things:
GoogleAuth
clientOptions
, making it easier for customers to see options for all auth clients:Testing
This is mostly a TypeScript-level change; non-functional. However, I've added a simple test to ensure compatibility.
Additional Information
The
clientOptions
field could be improved by the following:As it would be nice to if we could use the constructor of
T
to narrow the options to justT
's constructor options.Fixes #1677
🦕