-
Notifications
You must be signed in to change notification settings - Fork 926
Fix storage-types #3945
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 storage-types #3945
Conversation
|
Binary Size ReportAffected SDKs
Test Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this!
We also need to update packages/firebase/index.d.ts
packages/storage-types/index.d.ts
Outdated
| null | ||
| ((a: UploadTaskSnapshot) => any), | ||
error?: ((a: Error) => any) | null, | ||
| ((a: UploadTaskSnapshot) => unknown), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This unknown
seems inconsistent with the other return types.
Since this is going to land in a breaking change release, do you think it makes sense to start using more descriptive names than "a"? (here and everywhere)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, seems like a good idea.
packages/firebase/index.d.ts
Outdated
name: string; | ||
code: string; | ||
message: string; | ||
serverResponse: null | string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who adds serverResponse
to the error object?
In #3946, I'm moving template data under a new field customData
to avoid overwriting existing fields, should we do the same for serverResponse
?
8ec97ca
to
7e88943
Compare
Depends on #3946, rebase after that is merged. |
7e88943
to
16c4ebe
Compare
packages/firebase/index.d.ts
Outdated
* An error returned by the Firebase Storage SDK. | ||
*/ | ||
interface FirebaseStorageError extends FirebaseError { | ||
customData: { serverResponse: string | null }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you have a getter serverResponse
, customData
feels like the internal implementation and you can just expose the getter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Separated out from storage modularization PR: #3499
Should fix #1515