Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file.move return type (MoveResponse) is mostly un-typed #2364

Open
mgabeler-lee-6rs opened this issue Nov 14, 2023 · 3 comments
Open

file.move return type (MoveResponse) is mostly un-typed #2364

mgabeler-lee-6rs opened this issue Nov 14, 2023 · 3 comments
Assignees
Labels
api: storage Issues related to the googleapis/nodejs-storage API. next major: breaking change this is a change that we should wait to bundle into the next major version type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@mgabeler-lee-6rs
Copy link
Contributor

Environment details

  • OS: n/a
  • Node.js version: n/a
  • npm version: n/a
  • @google-cloud/storage version: 7.6.0

Steps to reproduce

  1. Install the library
  2. Observe the Promise-ified return type of file.move

The MoveResponse type (defined at https://github.com/googleapis/nodejs-storage/blob/v7.6.0/src/file.ts#L266) is just [unknown]. This doesn't seem correct, and is certainly unhelpful.

From the definition of MoveCallback (at https://github.com/googleapis/nodejs-storage/blob/v7.6.0/src/file.ts#L268-L274), it seems like it should be something like [File, unknown] matching destinationFile, apiResponse for the non-error version of the callback args.

@mgabeler-lee-6rs mgabeler-lee-6rs added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 14, 2023
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Nov 14, 2023
@ddelgrosso1 ddelgrosso1 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. next major: breaking change this is a change that we should wait to bundle into the next major version and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Nov 15, 2023
@ddelgrosso1
Copy link
Contributor

Thanks for opening an issue @mgabeler-lee-6rs. We are in the process of cleaning up / more strongly typing things within the library. Looking back at the history MoveResponse was originally [Metadata] where Metadata = any. There are quiet a few places where the callback versions don't necessarily align with the promisified version. We intend to clean those up as well. Unfortunately, more strongly typing things / changing signatures are a breaking change that will have to wait until the next major revision of the library.

@ddelgrosso1 ddelgrosso1 self-assigned this Nov 15, 2023
@crossan007
Copy link

Any updates on this?

@ddelgrosso1
Copy link
Contributor

@crossan007 our next major version is currently being worked on and this should be part of that release. No firm timeline on the date for release but I'll update accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. next major: breaking change this is a change that we should wait to bundle into the next major version type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants