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

fix: expires can be a Date, string, or number #548

Merged
merged 8 commits into from
Dec 21, 2018

Conversation

jspri
Copy link
Contributor

@jspri jspri commented Dec 10, 2018

Brought types inline with documentation for getSignedUrl and getSignedPolicy

https://cloud.google.com/nodejs/docs/reference/storage/2.3.x/File#getSignedUrl

The documentation states options.expires can be any type.

Internally new Date() accepts string | number | Date so I have used that.

https://github.com/Microsoft/TypeScript/blob/c2898db9dd58c9b0681d6131ed6076d71d89e6b5/lib/lib.es2015.core.d.ts#L90

You may want to update the web documentation from any to string | number | Date but I'm not sure of your conventions for that.

  • Tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 10, 2018
Copy link
Contributor Author

@jspri jspri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lint

src/file.ts Outdated Show resolved Hide resolved
src/file.ts Outdated Show resolved Hide resolved
@jkwlui jkwlui added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2018
@jkwlui jkwlui added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 12, 2018
@jkwlui jkwlui assigned jkwlui and jspri and unassigned jkwlui Dec 12, 2018
@kokoro-team kokoro-team removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 12, 2018
@jkwlui jkwlui added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 19, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 19, 2018
@JustinBeckwith JustinBeckwith changed the title Update types fix: expires can be a Date, string, or number Dec 21, 2018
@JustinBeckwith JustinBeckwith added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 21, 2018
@kokoro-team kokoro-team removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 21, 2018
@JustinBeckwith JustinBeckwith merged commit 6c0f960 into googleapis:master Dec 21, 2018
@JustinBeckwith
Copy link
Contributor

Thank you so much for the fix!

@jspri jspri deleted the patch-2 branch December 23, 2018 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants