Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

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

Open

Description

@mgabeler-lee-6rs

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.

Activity

  1. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Nov 14, 2023
  2. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    next major: breaking changethis is a change that we should wait to bundle into the next major version
    and removed
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Nov 15, 2023
  3. ddelgrosso1 commented on Nov 15, 2023

    @ddelgrosso1
    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.

  4. self-assigned this
    on Nov 15, 2023
  5. crossan007 commented on Oct 18, 2024

    @crossan007

    Any updates on this?

  6. ddelgrosso1 commented on Oct 18, 2024

    @ddelgrosso1
    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.

  7. crossan007 commented on Jan 22, 2025

    @crossan007

    Any idea if this has been released yet?

  8. ddelgrosso1 commented on Feb 3, 2025

    @ddelgrosso1
    Contributor

    @crossan007 it has not been released as of yet. Work is still being done to prepare the next major revision of this library.

  9. removed their assignment
    on Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: storageIssues related to the googleapis/nodejs-storage API.next major: breaking changethis is a change that we should wait to bundle into the next major versiontype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions