Skip to content

Commit

Permalink
update typings for credentialsProviderChain & httpOptions (#2240)
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Sep 7, 2018
1 parent 167bc31 commit f5a3482
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/core.d.ts
@@ -1,4 +1,5 @@
export {Config} from './config';
export {HTTPOptions} from './config';
export {Credentials} from './credentials';
export {CognitoIdentityCredentials} from './credentials/cognito_identity_credentials';
export {CredentialProviderChain} from './credentials/credential_provider_chain';
Expand Down
2 changes: 1 addition & 1 deletion lib/credentials/credential_provider_chain.d.ts
@@ -1,6 +1,6 @@
import {Credentials} from '../credentials';
import {AWSError} from '../error';
export class CredentialProviderChain extends Credentials {
export class CredentialProviderChain {
/**
* Creates a new CredentialProviderChain with a default set of providers specified by defaultProviders.
*/
Expand Down
8 changes: 7 additions & 1 deletion ts/config.ts
Expand Up @@ -95,11 +95,17 @@ AWS.config.update({
fake: 'fake'
}, true);

//Test httpOption interface
var httpOptions:AWS.HTTPOptions = {
timeout: 6000
}

// Test constructing with a CredentialProviderChain
var options = {
credentialProvider: new AWS.CredentialProviderChain([
() => new AWS.EC2MetadataCredentials()
])
]),
httpOptions
};
var s3 = new AWS.S3(options);
var ses = new AWS.SES(options);

0 comments on commit f5a3482

Please sign in to comment.