@@ -7,22 +7,17 @@ export interface ImdsCredentials {
7
7
Expiration : string ;
8
8
}
9
9
10
- export function isImdsCredentials ( arg : any ) : arg is ImdsCredentials {
11
- return (
12
- Boolean ( arg ) &&
13
- typeof arg === "object" &&
14
- typeof arg . AccessKeyId === "string" &&
15
- typeof arg . SecretAccessKey === "string" &&
16
- typeof arg . Token === "string" &&
17
- typeof arg . Expiration === "string"
18
- ) ;
19
- }
10
+ export const isImdsCredentials = ( arg : any ) : arg is ImdsCredentials =>
11
+ Boolean ( arg ) &&
12
+ typeof arg === "object" &&
13
+ typeof arg . AccessKeyId === "string" &&
14
+ typeof arg . SecretAccessKey === "string" &&
15
+ typeof arg . Token === "string" &&
16
+ typeof arg . Expiration === "string" ;
20
17
21
- export function fromImdsCredentials ( creds : ImdsCredentials ) : Credentials {
22
- return {
23
- accessKeyId : creds . AccessKeyId ,
24
- secretAccessKey : creds . SecretAccessKey ,
25
- sessionToken : creds . Token ,
26
- expiration : new Date ( creds . Expiration )
27
- } ;
28
- }
18
+ export const fromImdsCredentials = ( creds : ImdsCredentials ) : Credentials => ( {
19
+ accessKeyId : creds . AccessKeyId ,
20
+ secretAccessKey : creds . SecretAccessKey ,
21
+ sessionToken : creds . Token ,
22
+ expiration : new Date ( creds . Expiration )
23
+ } ) ;
0 commit comments