Skip to content

Commit

Permalink
fix: use NodeJS.ReadableStream type for upload body type to prevent…
Browse files Browse the repository at this point in the history
… conflict with DOM `ReadableStream` (#33)
  • Loading branch information
juice49 authored Jan 4, 2023
1 parent 10a39ab commit 8cbfe0c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sanityClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ export class ObservableSanityClient {
*/
upload(
assetType: 'file' | 'image',
body: File | Blob | Buffer | ReadableStream,
body: File | Blob | Buffer | NodeJS.ReadableStream,
options?: UploadOptions
): Observable<
ResponseEvent<{document: SanityAssetDocument | SanityImageAssetDocument}> | ProgressEvent
Expand All @@ -959,7 +959,7 @@ export class ObservableSanityClient {
*/
upload(
assetType: 'file',
body: File | Blob | Buffer | ReadableStream,
body: File | Blob | Buffer | NodeJS.ReadableStream,
options?: UploadOptions
): Observable<ResponseEvent<{document: SanityAssetDocument}> | ProgressEvent>

Expand All @@ -972,7 +972,7 @@ export class ObservableSanityClient {
*/
upload(
assetType: 'image',
body: File | Blob | Buffer | ReadableStream,
body: File | Blob | Buffer | NodeJS.ReadableStream,
options?: UploadOptions
): Observable<ResponseEvent<{document: SanityImageAssetDocument}> | ProgressEvent>

Expand Down Expand Up @@ -1609,7 +1609,7 @@ export interface SanityClient {
*/
upload(
assetType: 'file' | 'image',
body: File | Blob | Buffer | ReadableStream,
body: File | Blob | Buffer | NodeJS.ReadableStream,
options?: UploadOptions
): Promise<SanityAssetDocument | SanityImageAssetDocument>

Expand All @@ -1622,7 +1622,7 @@ export interface SanityClient {
*/
upload(
assetType: 'file',
body: File | Blob | Buffer | ReadableStream,
body: File | Blob | Buffer | NodeJS.ReadableStream,
options?: UploadOptions
): Promise<SanityAssetDocument>

Expand All @@ -1635,7 +1635,7 @@ export interface SanityClient {
*/
upload(
assetType: 'image',
body: File | Blob | Buffer | ReadableStream,
body: File | Blob | Buffer | NodeJS.ReadableStream,
options?: UploadOptions
): Promise<SanityImageAssetDocument>

Expand Down

0 comments on commit 8cbfe0c

Please sign in to comment.