dropbox-sdk-js
dropbox-sdk-js copied to clipboard
TypeScript definitions for `Dropbox.prototype.filesDownload`
Current this method is defined as returning Promise<dropbox.files.FileMetadata>.
The actual return value is closer to Promise<dropbox.files.FileMetadata & {fileBlob?: File}>;
I am not sure if it would be more appropriate to change this to its own type definitions like dropbox.files.FileDownloadResult or to just user the & syntax listed above. I am also not sure if the fileBlob property is actually optional or not.
Thanks for pointing this out! I'll ask the team to fix that up.
The file data (in fileBlob in browser environments, or fileBinary in Node) is guaranteed for any "download" style call, such as filesDownload, as long as the call succeeds (i.e., doesn't raise an error).
Seems this is a duplicate of https://github.com/dropbox/dropbox-sdk-js/issues/162#issuecomment-364779780 (and a few other ones like #82)
This is still confusing
@justinmoon Thanks for the note!
Any idea when this will be fixed?
@LeanderD Unfortunately I don't have a timeline for work on this.