Skip to content

Commit

Permalink
build: type the return of xml.parse to fix compilation problem with 4…
Browse files Browse the repository at this point in the history
….3.0 (#2307)
  • Loading branch information
ddelgrosso1 authored Sep 20, 2023
1 parent 9bba9e3 commit 9724239
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"compressible": "^2.0.12",
"duplexify": "^4.0.0",
"ent": "^2.2.0",
"fast-xml-parser": "^4.2.2",
"fast-xml-parser": "^4.3.0",
"gaxios": "^6.0.2",
"google-auth-library": "^9.0.0",
"mime": "^3.0.0",
Expand Down
6 changes: 5 additions & 1 deletion src/transfer-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ class XMLMultiPartUploadHelper implements MultiPartUploadHelper {
if (res.data && res.data.error) {
throw res.data.error;
}
const parsedXML = this.xmlParser.parse(res.data);
const parsedXML = this.xmlParser.parse<{
InitiateMultipartUploadResult: {
UploadId: string;
};
}>(res.data);
this.uploadId = parsedXML.InitiateMultipartUploadResult.UploadId;
} catch (e) {
this.#handleErrorResponse(e as Error, bail);
Expand Down

0 comments on commit 9724239

Please sign in to comment.