Skip to content

Commit

Permalink
feat: export type of axios
Browse files Browse the repository at this point in the history
* feat: type of axios completion & new api

* revert: revert form runner
  • Loading branch information
zhangmo8 authored Aug 7, 2024
1 parent 316bf4f commit d279beb
Show file tree
Hide file tree
Showing 3 changed files with 3,145 additions and 2,489 deletions.
4 changes: 2 additions & 2 deletions packages/axle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"dependencies": {
"@varlet/shared": "2.20.3",
"axios": "^1.4.0",
"axios": "^1.7.3",
"crypto-js": "^4.2.0",
"lodash": "4.17.21",
"minimatch": "^9.0.3",
Expand All @@ -70,4 +70,4 @@
"bugs": {
"url": "https://github.com/varletjs/axle/issues"
}
}
}
13 changes: 13 additions & 0 deletions packages/axle/src/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,24 @@ import type {
HeadersDefaults,
InternalAxiosRequestConfig,
ResponseType,
AxiosError,
} from 'axios'
import { objectToFormData } from './utils'

export interface AxleRequestConfig extends AxiosRequestConfig {}

export type {
AxiosInstance,
AxiosInterceptorOptions,
AxiosRequestConfig,
AxiosRequestHeaders,
AxiosResponse,
HeadersDefaults,
InternalAxiosRequestConfig,
ResponseType,
AxiosError,
}

export type FetchRunner = <R = AxiosResponse, P = Record<string, any>>(
url: string,
params?: P,
Expand Down
Loading

0 comments on commit d279beb

Please sign in to comment.