diff --git a/packages/axios/src/index.ts b/packages/axios/src/index.ts index 6cc7a08df..5c08acecf 100644 --- a/packages/axios/src/index.ts +++ b/packages/axios/src/index.ts @@ -28,6 +28,7 @@ const AXIOS_DEPENDENCIES: GeneratorDependency[] = [ values: true, syntheticDefaultImport: true, }, + { name: 'AxiosInstance' }, { name: 'AxiosRequestConfig' }, { name: 'AxiosResponse' }, ], @@ -199,7 +200,7 @@ ${ ? `type SecondParameter unknown> = Parameters[1];\n\n` : '' } - ${noFunction ? '' : `export const ${title} = () => {\n`}`; + ${noFunction ? '' : `export const ${title} = (axios: AxiosInstance = axios.create()) => {\n`}`; export const generateAxiosFooter: ClientFooterBuilder = ({ operationNames,