Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix typings for credentials provider chain #3510

Merged
merged 1 commit into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-Types-7306bc23.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "Types",
"description": "Update types for credential provider chain"
}
4 changes: 2 additions & 2 deletions lib/credentials/credential_provider_chain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export class CredentialProviderChain {
/**
* Resolves the provider chain by searching for the first set of credentials in providers.
*/
resolve(callback:(err: AWSError, credentials: Credentials) => void): CredentialProviderChain;
resolve(callback:(err: AWSError|null, credentials?: Credentials) => void): CredentialProviderChain;
/**
* Return a Promise on resolve() function
*/
resolvePromise(): Promise<Credentials>;
/**
* Returns a list of credentials objects or functions that return credentials objects. If the provider is a function, the function will be executed lazily when the provider needs to be checked for valid credentials. By default, this object will be set to the defaultProviders.
*/
providers: Credentials[]|provider[];
providers: Array<Credentials|provider>;

static defaultProviders: provider[]
}
Expand Down