Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
fix(params): adicionado novos types ao params
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefelipeschulle committed Aug 2, 2024
1 parent 0608988 commit c5d502a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brainylab/fetch-wrapper",
"version": "0.5.4",
"version": "0.5.5",
"keywords": [
"fetch",
"wrapper",
Expand Down
3 changes: 2 additions & 1 deletion src/lib/fetch-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { createPath } from '../utils/create-path';
import { mergeConfigs } from '../utils/merge-configs';
import { objectToUrlParams } from '../utils/object-to-url-params';

import type { ObjectToUrl } from '../utils/object-to-url-params';
import type { FetchWrapperProps } from './create-instance';

export type FwprInterceptors = {
Expand All @@ -17,7 +18,7 @@ export type FetchWrapperDefaults = {
interceptors?: FwprInterceptors;
};
type FetchWrapperInit = RequestInit & {
params?: Record<string, string | number | string[] | number[]>;
params?: ObjectToUrl;
};

type FetchWrapperResponse<T> = {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/object-to-url-params.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
type ObjectToUrl = Record<
export type ObjectToUrl = Record<
string,
string | number | string[] | number[] | undefined | null
string | number | string[] | number[] | boolean | undefined | null
>;

function cleanObject(obj: ObjectToUrl): ObjectToUrl {
Expand Down

0 comments on commit c5d502a

Please sign in to comment.