minio-js icon indicating copy to clipboard operation
minio-js copied to clipboard

missing possible parameters in client methods

Open d-michail opened this issue 1 year ago • 5 comments

Hi,

I am experiencing a small issue with the minio client types. I am trying to call a few functions like getObject, listObjects and copyObject but the type definitions seem to be incomplete.

As an example I am using

client.getObject(bucket, uuId, { versionId: 'myversion' })

The underlying implementation supports the call, but the type does not, assuming that I always use a callback for the 3rd parameter. Am I missing something obvious here, or is it just a bug in the types definition? If it is, I can possibly send a PR.

d-michail avatar Nov 23 '23 13:11 d-michail

This is supposed to be typing's mistake. But I can see that it should be fixed on https://github.com/minio/minio-js/pull/1186

aldy505 avatar Nov 24 '23 01:11 aldy505

Please use the latest async await /promise style. The callback style is deprecated. We are migrating to typescript, the migration is still in progress.

@d-michail

prakashsvmx avatar Nov 24 '23 01:11 prakashsvmx