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

getFilesStream is returning a function instead a ReadableStream #1695

Closed
AnthonyLzq opened this issue Nov 3, 2021 · 2 comments · Fixed by #1697
Closed

getFilesStream is returning a function instead a ReadableStream #1695

AnthonyLzq opened this issue Nov 3, 2021 · 2 comments · Fixed by #1697
Assignees
Labels
api: storage Issues related to the googleapis/nodejs-storage API. 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.

Comments

@AnthonyLzq
Copy link

According to the docs, the getFilesStream method should return a ReadableStream, but in the IntelliSense of VSCode, the return of the method is a Function.

image

The code I have is:

import { getStorage } from 'firebase-admin/storage'
const bucket = getStorage().bucket()
bucket.getFilesStream()

Also, in the bucket.d.ts file there is the following:

image

Environment details

  • OS: Manjaro Linux x86_64
  • Node.js version: 16.13.0
  • npm version: 8.1.0
  • @google-cloud/storage version: 5.15.3

Steps to reproduce

  1. Copy the provided code and check the return of the method provided from the IntelliSense.
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Nov 3, 2021
@ddelgrosso1 ddelgrosso1 added 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 3, 2021
@ddelgrosso1 ddelgrosso1 self-assigned this Nov 3, 2021
@ddelgrosso1
Copy link
Contributor

Thank you for bringing this to our attention @AnthonyLzq. I have confirmed that this does incorrectly show in intellisense (and the types definition file). I will look into fixing the definition and let you know when it is fixed.

@ddelgrosso1
Copy link
Contributor

@AnthonyLzq this should be fixed in v5.15.5 once it gets merged / released.

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. 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants