Skip to content

Commit 755a540

Browse files
authored
modifying return type of onedrive create (#442)
1 parent 5c32593 commit 755a540

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tasks/OneDriveLargeFileUploadTask.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class OneDriveLargeFileUploadTask<T> extends LargeFileUploadTask<T> {
9393
* @param {OneDriveLargeFileUploadOptions} options - The options for upload task
9494
* @returns The promise that will be resolves to OneDriveLargeFileUploadTask instance
9595
*/
96-
public static async create(client: Client, file: Blob | Buffer | File, options: OneDriveLargeFileUploadOptions): Promise<unknown> {
96+
public static async create(client: Client, file: Blob | Buffer | File, options: OneDriveLargeFileUploadOptions): Promise<OneDriveLargeFileUploadTask<Blob | ArrayBuffer | Buffer>> {
9797
if (!client || !file || !options) {
9898
throw new GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");
9999
}
@@ -112,7 +112,7 @@ export class OneDriveLargeFileUploadTask<T> extends LargeFileUploadTask<T> {
112112
content = b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength);
113113
}
114114
const fileObj = new FileUpload(content, name, size);
115-
return this.createTaskWithFileObject(client, fileObj, options);
115+
return this.createTaskWithFileObject<Blob | ArrayBuffer | Buffer>(client, fileObj, options);
116116
}
117117

118118
/**

0 commit comments

Comments
 (0)