Skip to content

Commit a6bd3b9

Browse files
committed
fix(types): add interface stub for RequestInit
1 parent 5306c73 commit a6bd3b9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.changeset/forty-cooks-deny.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@smithy/types": patch
3+
---
4+
5+
add interface stub for browser RequestInit type

packages/types/src/http/httpHandlerInitialization.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,12 @@ export interface FetchHttpHandlerOptions {
123123
* });
124124
* ```
125125
*/
126-
requestInit?: (httpRequest: IHttpRequest) => RequestInit;
126+
requestInit?: (httpRequest: IHttpRequest) => {} extends RequestInit ? never : RequestInit;
127+
}
128+
129+
declare global {
130+
/**
131+
* interface merging stub.
132+
*/
133+
interface RequestInit {}
127134
}

0 commit comments

Comments
 (0)