Skip to content

Commit

Permalink
refactor: types cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
glebcha committed Nov 21, 2024
1 parent 6a99b5a commit 1634e28
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,10 @@ export type CreateMethod = {
format?: keyof Omit<Body, 'body' | 'bodyUsed'>,
};

type CreateHttpClientOptions = {
export type CreateHttpClientOptions = {
baseUrl?: string;
middleware?: Middleware;
};

type ErrorText = 'ErrorText' | 'error_text';
type ErrorCode = 'ErrorCode' | 'error_code';
type ErrorFields = ErrorText | ErrorCode;
type ErrorBody = {
[key in ErrorFields]?: string
};

type ResponseFormats = keyof Omit<Body, 'body' | 'bodyUsed' | 'json'>;
export type FormattedResponse = ReturnType<Body[ResponseFormats]> | Record<string, unknown>;

0 comments on commit 1634e28

Please sign in to comment.