Skip to content

Commit

Permalink
fix: using RawAxiosHeaders type cause compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
ramram1048 committed May 13, 2024
1 parent b9f4848 commit 4c59563
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions index.d.cts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
interface RawAxiosHeaders {
// tslint:disable-next-line:interface-over-type-literal
type RawAxiosHeaders = {
[key: string]: axios.AxiosHeaderValue;
}
};

type MethodsHeaders = Partial<{
[Key in axios.Method as Lowercase<Key>]: AxiosHeaders;
Expand Down
5 changes: 3 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// TypeScript Version: 4.7
export type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;

interface RawAxiosHeaders {
// tslint:disable-next-line:interface-over-type-literal
type RawAxiosHeaders = {
[key: string]: AxiosHeaderValue;
}
};

type MethodsHeaders = Partial<{
[Key in Method as Lowercase<Key>]: AxiosHeaders;
Expand Down

0 comments on commit 4c59563

Please sign in to comment.