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

fix TokenFileWebIdentityCredentials typing #4388

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

Conversation

ChenNima
Copy link

Change the typing of the constructor param for TokenFileWebIdentityCredentials to the same as STS.Types.ClientConfiguration, since the whole config is passed down to the STS client.

Fix the issue that type error occurs when changing the STS endpoint via the constructor param of TokenFileWebIdentityCredentials. For example:

new AWS.TokenFileWebIdentityCredentials({
  endpoint: 'https://testendpoint.com'
})

will throw error

Argument of type '{ endpoint: string; }' is not assignable to parameter of type 'ConfigurationOptions'.
  Object literal may only specify known properties, and 'endpoint' does not exist in type 'ConfigurationOptions'.ts(2345)

but actually, the code will change the STS client endpoint successfully.

Checklist
  • npm run test passes
  • .d.ts file is updated
  • changelog is added, npm run add-change

@ChenNima ChenNima requested a review from a team as a code owner April 10, 2023 10:19
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.

None yet

1 participant