1 year ago

#373527

test-img

DcraftBg

Do descriptions from functions after exporting get deleted?

So lets say i have this really nice function i want to export with a const are:

export const are = {
 
 you: function(){
   ...
 }
}

And now lets say i added a decription to it that discribes what it does:

export const are = {
 /**
 * This functions does stuff :D
 */
 you: function(){
   ...
 }
}

Whilest you can view the description from this script, it seems as though when it has been exported and reimported into another script it loses its description. Lets say i have this script called script.js:

import * as run from "run.js"
//and now lets say i call the function
run.are.you()
//when you type .you it just says the default text for a function

If you try exporting it seperately like

import {are} from "run.js";
are.you()
//when you type .you it still says the default text for a void function 

Just to note I am using Visual Studio Code.

javascript

visual-studio-code

editor

documentation

0 Answers

Your Answer

Accepted video resources