Open danielbankhead opened 1 year ago
We should normalize GoogleAuth<T extends AuthClient = JSONClient> to GoogleAuth<T extends AuthClient = AuthClient> (and GoogleAuthOptions as well).
GoogleAuth<T extends AuthClient = JSONClient>
GoogleAuth<T extends AuthClient = AuthClient>
GoogleAuthOptions
Additionally, we should:
change clientOptions from: https://github.com/googleapis/google-auth-library-nodejs/blob/4f94ffe474ee41b560813b81e8d621be848d38d0/src/auth/googleauth.ts#L106-L114 to:
clientOptions
/** * Options object passed to the constructor of the client */ clientOptions?: ConstructorParameters<typeof T>[0];
In both GoogleAuth and GoogleAuthOptions to accurately match the expected client options.
GoogleAuth
change cachedCredential from: https://github.com/googleapis/google-auth-library-nodejs/blob/f950465967e6140d061d44ab0d12f08e0117c0ec/src/auth/googleauth.ts#L160-L161 to:
cachedCredential
cachedCredential: T | null = null;
in order to normalize the expected AuthClient
AuthClient
Dependencies:
Implementation Notes:
ConstructorParameters
AuthClientOptions
We should normalize
GoogleAuth<T extends AuthClient = JSONClient>
toGoogleAuth<T extends AuthClient = AuthClient>
(andGoogleAuthOptions
as well).Additionally, we should:
change
clientOptions
from: https://github.com/googleapis/google-auth-library-nodejs/blob/4f94ffe474ee41b560813b81e8d621be848d38d0/src/auth/googleauth.ts#L106-L114 to:In both
GoogleAuth
andGoogleAuthOptions
to accurately match the expected client options.change
cachedCredential
from: https://github.com/googleapis/google-auth-library-nodejs/blob/f950465967e6140d061d44ab0d12f08e0117c0ec/src/auth/googleauth.ts#L160-L161 to:in order to normalize the expected
AuthClient
Dependencies:
Implementation Notes:
ConstructorParameters
results:AuthClient
to the desired overload signature as the first overload ('desired' = whichever one exposes the extendedAuthClientOptions
as the first option).