We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fe2ec9 commit 1e8261aCopy full SHA for 1e8261a
src/types.d.ts
@@ -1,3 +1,5 @@
1
+import { Readable as NodeReadableStream } from 'stream'
2
+
3
interface ProgressStatus {
4
total: number
5
loaded: number
@@ -6,7 +8,9 @@ interface ProgressStatus {
6
8
7
9
export interface ProgressFn { (status: ProgressStatus): void }
10
-export interface FetchOptions extends RequestInit {
11
+type Override<T, R> = Omit<T, keyof R> & R
12
13
+export type FetchOptions = Override<RequestInit, {
14
/**
15
* Extended body with support for node readable stream
16
*/
@@ -29,7 +33,7 @@ export interface FetchOptions extends RequestInit {
29
33
30
34
onDownloadProgress?: ProgressFn
31
35
overrideMimeType?: string
32
-}
36
+}>
37
38
export interface HTTPOptions extends FetchOptions {
39
json?: any
0 commit comments