Skip to content

Commit 9c1a1fc

Browse files
authored
Merge pull request #1754 from LinuCC/1659-add-unknown-as-type-for-body
2 parents 5bdda40 + 6480fba commit 9c1a1fc

File tree

9 files changed

+9
-19
lines changed

9 files changed

+9
-19
lines changed

packages/client-fetch/src/types.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ export interface RequestOptions<
4848
*
4949
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
5050
*/
51-
body?:
52-
| RequestInit['body']
53-
| Record<string, unknown>
54-
| Array<Record<string, unknown>>
55-
| Array<unknown>
56-
| number;
51+
body?: unknown;
5752
path?: Record<string, unknown>;
5853
query?: Record<string, unknown>;
5954
/**

packages/client-next/src/types.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ export interface RequestOptions<
4848
*
4949
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
5050
*/
51-
body?:
52-
| RequestInit['body']
53-
| Record<string, unknown>
54-
| Array<Record<string, unknown>>
55-
| Array<unknown>
56-
| number;
51+
body?: unknown;
5752
path?: Record<string, unknown>;
5853
query?: Record<string, unknown>;
5954
/**

packages/client-nuxt/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export interface RequestOptions<
6868
*
6969
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
7070
*/
71-
body?: BodyInit | Record<string, any> | null;
71+
body?: unknown;
7272
path?: FetchOptions<unknown>['query'];
7373
query?: FetchOptions<unknown>['query'];
7474
}> {

packages/openapi-ts/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/bundle/client/index.d.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ interface RequestOptions<ThrowOnError extends boolean = boolean, Url extends str
162162
*
163163
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
164164
*/
165-
body?: RequestInit['body'] | Record<string, unknown> | Array<Record<string, unknown>> | Array<unknown> | number;
165+
body?: unknown;
166166
path?: Record<string, unknown>;
167167
query?: Record<string, unknown>;
168168
/**

packages/openapi-ts/test/__snapshots__/3.1.x/clients/@hey-api/client-fetch/bundle/client/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ interface RequestOptions<ThrowOnError extends boolean = boolean, Url extends str
162162
*
163163
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
164164
*/
165-
body?: RequestInit['body'] | Record<string, unknown> | Array<Record<string, unknown>> | Array<unknown> | number;
165+
body?: unknown;
166166
path?: Record<string, unknown>;
167167
query?: Record<string, unknown>;
168168
/**

packages/openapi-ts/test/__snapshots__/3.1.x/clients/@hey-api/client-next/bundle/client/index.d.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ interface RequestOptions<ThrowOnError extends boolean = boolean, Url extends str
162162
*
163163
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
164164
*/
165-
body?: RequestInit['body'] | Record<string, unknown> | Array<Record<string, unknown>> | Array<unknown> | number;
165+
body?: unknown;
166166
path?: Record<string, unknown>;
167167
query?: Record<string, unknown>;
168168
/**

packages/openapi-ts/test/__snapshots__/3.1.x/clients/@hey-api/client-next/bundle/client/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ interface RequestOptions<ThrowOnError extends boolean = boolean, Url extends str
162162
*
163163
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
164164
*/
165-
body?: RequestInit['body'] | Record<string, unknown> | Array<Record<string, unknown>> | Array<unknown> | number;
165+
body?: unknown;
166166
path?: Record<string, unknown>;
167167
query?: Record<string, unknown>;
168168
/**

packages/openapi-ts/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/bundle/client/index.d.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ interface RequestOptions<TComposable extends Composable = Composable, ResT = unk
136136
*
137137
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
138138
*/
139-
body?: BodyInit | Record<string, any> | null;
139+
body?: unknown;
140140
path?: FetchOptions<unknown>['query'];
141141
query?: FetchOptions<unknown>['query'];
142142
}> {

packages/openapi-ts/test/__snapshots__/3.1.x/clients/@hey-api/client-nuxt/bundle/client/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ interface RequestOptions<TComposable extends Composable = Composable, ResT = unk
136136
*
137137
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
138138
*/
139-
body?: BodyInit | Record<string, any> | null;
139+
body?: unknown;
140140
path?: FetchOptions<unknown>['query'];
141141
query?: FetchOptions<unknown>['query'];
142142
}> {

0 commit comments

Comments
 (0)