JSDoc types of the GetTemporaryLinkResult interface are not updated
See original GitHub issueDescribe the bug I’m calling:
const operationResult = await dbx.filesGetTemporaryLink({
path: `/${CONFIG_STORAGE.uploader.assetsPath}/${fileUUID}`
});
which is supposed return a promise of GetTemporaryLinkResult
interface:
But in fact it returns something else:
That’s why IDE returns a warning regarding the status
field of GetTemporaryLinkResult
.
To Reproduce
const _dropboxFactory = function _dropboxFactory() {
const dbx = new Dropbox({
accessToken: CONFIG_STORAGE.apiToken
});
return dbx;
};
export const fileDownload = async function fileDownload(fileUUID) {
const dbx = _dropboxFactory();
try {
const operationResult = await dbx.filesGetTemporaryLink({
path: `/${CONFIG_STORAGE.uploader.assetsPath}/${fileUUID}`
});
if ("OK" === http.STATUS_CODES[operationResult.status].toUpperCase()) {…}
} catch (err) {…}
};
Expected Behavior JSDoc/types should be updated in accordance with the design de facto.
Actual Behavior
The GetTemporaryLinkResult
typing documentation seems to be outdated comparing to what comes in fact out of filesGetTemporaryLink({…})
.
Versions
- What version of the SDK are you using? 7.0.0
- What version of the language are you using? JS 2020
- Are you using Javascript or Typescript? JS
- What platform are you using? (if applicable) Node.js
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
JSDoc Reference - TypeScript: Documentation
JSDoc Reference. The list below outlines which constructs are currently supported when using JSDoc annotations to provide type information in JavaScript files.
Read more >Use JSDoc: @type
The @type tag allows you to provide a type expression identifying the type of value that a symbol may contain, or the type...
Read more >Support JSDoc type information · Issue #514 · microsoft/vscode
Below a JSDOC comment which does not show properly in document type javascript. // Interface new functions /** * @param {Object} to *...
Read more >how to use interfaces with jsdoc? - typescript - Stack Overflow
Typescript doesn't support defining interfaces via JSDoc. But you can use an object type in your @param :
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, unfortunately that wouldn’t fix that bug. I have added that to my list of things to take a look at though so hopefully a fix should be out soon.
@greg-db, thanks a lot, the warning is gone.