Last active
January 30, 2018 00:41
-
-
Save masahirompp/5bedaeec319544a3b41f2c3bb3000353 to your computer and use it in GitHub Desktop.
[Experiment] define type https://github.com/kndt84/aws-api-gateway-client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'aws-api-gateway-client' { | |
import { AxiosResponse } from 'axios' | |
interface AwsApiGatewayClientConfig { | |
accessKey?: string | |
secretKey?: string | |
sessionToken?: string | |
region?: string | |
apiKey?: string | |
invokeUrl: string | |
service?: string | |
defaultContentType?: string | |
defaultAcceptType?: string | |
systemClockOffset?: number | |
} | |
interface AwsApiGatewayClient { | |
invokeApi: <T>( | |
params: Object, | |
pathTemplate: string, | |
method: string, | |
additionalParams?: { | |
headers?: { Authorization?: string } | { [key: string]: string } | |
queryParams?: any | |
}, | |
body?: any | |
) => Promise<AxiosResponse<T>> | |
} | |
export const newClient: (config: AwsApiGatewayClientConfig) => AwsApiGatewayClient | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment