Skip to content

Commit

Permalink
Fix createFetchHeaders return type
Browse files Browse the repository at this point in the history
Update createFetchHeaders return type to fit Response headers
  • Loading branch information
hishamsabur authored May 29, 2023
1 parent 87f9c7c commit dba00f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/typeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export type UrlLike = string | {
url?: string;
}

export function createFetchHeaders (axiosHeaders: Record<string, string> = {}): string[][] {
const headers: string[][] = [];
export function createFetchHeaders (axiosHeaders: Record<string, string> = {}): [string, string][] {
const headers: [string, string][] = [];
Object.entries(axiosHeaders).forEach(([name, value]) => {
headers.push([name, value]);
});
Expand Down

0 comments on commit dba00f8

Please sign in to comment.