Skip to content

Commit

Permalink
fix: options types
Browse files Browse the repository at this point in the history
  • Loading branch information
Raubzeug committed Apr 13, 2023
1 parent c988c69 commit 4324fb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default class AxiosWrapper {
async request<T = any>(methodParams: ApiMethodParams): Promise<T> {
const {method, url, data = null, params, options = {}, retries = 0} = methodParams;

const axiosSettings: AxiosRequestConfig = options.requestConfig || {};
const axiosSettings = options.requestConfig || {};
const {concurrentId, collectRequest = true, timeout, headers, onDownloadProgress} = options;
if (concurrentId) {
this.cancelRequest(concurrentId);
Expand Down
6 changes: 3 additions & 3 deletions src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {AxiosRequestConfig, AxiosRequestHeaders, AxiosResponse} from 'axios';
import {AxiosRequestConfig, AxiosResponse} from 'axios';

export interface CollectorOptions {
collectRequests?: number;
Expand Down Expand Up @@ -44,8 +44,8 @@ export interface ApiMethodParams {
concurrentId?: string;
collectRequest?: boolean;
timeout?: number;
headers?: AxiosRequestHeaders;
requestConfig?: Record<string, unknown>;
headers?: AxiosRequestConfig['headers'];
requestConfig?: AxiosRequestConfig;
onDownloadProgress?: AxiosRequestConfig['onDownloadProgress'];
};
}

0 comments on commit 4324fb8

Please sign in to comment.