File tree 3 files changed +13
-6
lines changed
3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @firebase/storage ' : patch
3
+ ' @firebase/storage-compat ' : patch
4
+ ---
5
+
6
+ Fix typings for storage and storage-compat.
Original file line number Diff line number Diff line change @@ -170,8 +170,8 @@ export function getBytesInternal(
170
170
. then ( bytes =>
171
171
maxDownloadSizeBytes !== undefined
172
172
? // GCS may not honor the Range header for small files
173
- bytes . slice ( 0 , maxDownloadSizeBytes )
174
- : bytes
173
+ ( bytes as ArrayBuffer ) . slice ( 0 , maxDownloadSizeBytes )
174
+ : ( bytes as ArrayBuffer )
175
175
) ;
176
176
}
177
177
@@ -194,8 +194,8 @@ export function getBlobInternal(
194
194
. then ( blob =>
195
195
maxDownloadSizeBytes !== undefined
196
196
? // GCS may not honor the Range header for small files
197
- blob . slice ( 0 , maxDownloadSizeBytes )
198
- : blob
197
+ ( blob as Blob ) . slice ( 0 , maxDownloadSizeBytes )
198
+ : ( blob as Blob )
199
199
) ;
200
200
}
201
201
@@ -236,7 +236,7 @@ export function getStreamInternal(
236
236
237
237
ref . storage
238
238
. makeRequestWithTokens ( requestInfo , newStreamConnection )
239
- . then ( stream => stream . pipe ( result ) )
239
+ . then ( stream => ( stream as NodeJS . ReadableStream ) . pipe ( result ) )
240
240
. catch ( e => result . destroy ( e ) ) ;
241
241
return result ;
242
242
}
Original file line number Diff line number Diff line change @@ -278,7 +278,8 @@ const BUILTIN_TYPES = [
278
278
'Blob' ,
279
279
'ServiceWorkerRegistration' ,
280
280
'Record' ,
281
- 'Error'
281
+ 'Error' ,
282
+ 'NodeJS.ReadableStream'
282
283
] ;
283
284
284
285
// find all types (except for the built-ins and primitives) referenced in the function declaration
You can’t perform that action at this time.
0 commit comments