Skip to content

Commit 50da400

Browse files
committed
chore: fix types
1 parent 1478606 commit 50da400

File tree

1 file changed

+5
-5
lines changed
  • packages/server/create-request/src

1 file changed

+5
-5
lines changed

packages/server/create-request/src/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ export type BFFRequestPayload = {
1212
files?: Record<string, any>;
1313
};
1414

15-
// Narrowed cross-env request typings to avoid DOM/undici Request conflicts
16-
export type FetchInput = string | URL;
15+
// Browser-aligned typings so native fetch is assignable
16+
export type FetchInput = RequestInfo | URL;
1717

1818
export interface RequestInitLike {
1919
method?: string;
20-
headers?: Record<string, any> | [string, string][] | Headers;
21-
body?: unknown;
20+
headers?: HeadersInit;
21+
body?: BodyInit | null | undefined;
2222
}
2323

2424
export type FetchLike = (
2525
input: FetchInput,
26-
init?: RequestInitLike,
26+
init?: RequestInit | RequestInitLike,
2727
) => Promise<any>;
2828

2929
export type Sender<F = FetchLike> = ((...args: any[]) => Promise<any>) & {

0 commit comments

Comments
 (0)