diff --git a/src/index.ts b/src/index.ts index bd76111..d00fe2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,7 @@ export interface FetchInit extends Record { export type AxiosTransformer = (config: AxiosRequestConfig, input: string | undefined, init: FetchInit) => AxiosRequestConfig; -export type AxiosFetch = (input?: string, init?: FetchInit) => Response; +export type AxiosFetch = (input?: string, init?: FetchInit) => Promise; /** * A Fetch WebAPI implementation based on the Axios client @@ -19,7 +19,7 @@ export type AxiosFetch = (input?: string, init?: FetchInit) => Response; async function axiosFetch ( axios: AxiosInstance, // Convert the `fetch` style arguments into a Axios style config - transformer: AxiosTransformer, + transformer?: AxiosTransformer, input?: string, init: FetchInit = {} ) { diff --git a/tsconfig.json b/tsconfig.json index fa9cd13..458d0ba 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,7 @@ "esModuleInterop": true, "noImplicitAny": true, "noImplicitThis": true, + "strict": true, "alwaysStrict": true, "strictNullChecks": true, "strictFunctionTypes": true,