Skip to content

Commit

Permalink
fix: type of request client upload result
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetfan committed Jan 21, 2025
1 parent c001d54 commit 4ec81bd
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { AxiosResponse } from 'axios';

import type { RequestClient } from '../request-client';
import type { RequestClientConfig } from '../types';

Expand All @@ -10,11 +8,11 @@ class FileUploader {
this.client = client;
}

public async upload(
public async upload<T = any>(
url: string,
data: Record<string, any> & { file: Blob | File },
config?: RequestClientConfig,
): Promise<AxiosResponse> {
): Promise<T> {
const formData = new FormData();

Object.entries(data).forEach(([key, value]) => {
Expand Down

0 comments on commit 4ec81bd

Please sign in to comment.