Skip to content

Commit

Permalink
merge and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelgrosso1 committed Jul 24, 2023
1 parent 607b5ce commit e217a41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/transfer-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class XMLMultiPartUploadHelper implements MultiPartUploadHelper {
const sortedMap = new Map(
[...this.partsMap.entries()].sort((a, b) => a[0] - b[0])
);
const parts = [];
const parts: {}[] = [];
for (const entry of sortedMap.entries()) {
parts.push({PartNumber: entry[0], ETag: entry[1]});
}
Expand Down Expand Up @@ -374,7 +374,7 @@ export class TransferManager {
const limit = pLimit(
options.concurrencyLimit || DEFAULT_PARALLEL_UPLOAD_LIMIT
);
const promises = [];
const promises: Promise<UploadResponse>[] = [];
let allPaths: string[] = [];
if (!Array.isArray(filePathsOrDirectory)) {
for await (const curPath of this.getPathsFromDirectory(
Expand Down Expand Up @@ -462,7 +462,7 @@ export class TransferManager {
const limit = pLimit(
options.concurrencyLimit || DEFAULT_PARALLEL_DOWNLOAD_LIMIT
);
const promises = [];
const promises: Promise<DownloadResponse>[] = [];
let files: File[] = [];

if (!Array.isArray(filesOrFolder)) {
Expand Down Expand Up @@ -662,7 +662,7 @@ export class TransferManager {
options.partsMap
);
let partNumber = 1;
let promises = [];
let promises: Promise<void>[] = [];
try {
if (options.uploadId === undefined) {
await mpuHelper.initiateUpload();
Expand Down
2 changes: 1 addition & 1 deletion test/transfer-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ describe('Transfer Manager', () => {
sandbox = sinon.createSandbox();
readStreamStub = sandbox
.stub(fakeFs, 'createReadStream')
.returns(pThrough);
.returns(pThrough as unknown as fs.ReadStream);
mockGeneratorFunction = (bucket, fileName, uploadId, partsMap) => {
fakeHelper = sandbox.createStubInstance(FakeXMLHelper);
fakeHelper.uploadId = uploadId || '';
Expand Down

0 comments on commit e217a41

Please sign in to comment.