Skip to content

Commit c13ffbb

Browse files
committed
Fix d.ts for multipart options.
1 parent f877a13 commit c13ffbb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.d.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ declare module "react-native-background-upload" {
9393
* in the context of ShareExtension.
9494
*/
9595
appGroup?: string;
96+
// Necessary only for multipart type upload
97+
field?: string
9698
}
9799

98100
export interface MultipartUploadOptions extends UploadOptions {
@@ -108,7 +110,7 @@ declare module "react-native-background-upload" {
108110
export type UploadListenerEvent = 'progress' | 'error' | 'completed' | 'cancelled'
109111

110112
export default class Upload {
111-
static startUpload(options: UploadOptions): Promise<uploadId>
113+
static startUpload(options: UploadOptions | MultipartUploadOptions): Promise<uploadId>
112114
static addListener(event: UploadListenerEvent, uploadId: uploadId, data: object): void
113115
static addListener(event: 'progress', uploadId: uploadId, data: ProgressData): void
114116
static addListener(event: 'error', uploadId: uploadId, data: ErrorData): void

0 commit comments

Comments
 (0)