I'm making a node.js project, and work in Webstorm, where functions are usually highlighted in yellow. However in the following scenario, fnA
is not recognized as a function in file b.
//file a.js
module.exports = fnA;
/**
* Converts val to someOtherVal
* @param val
* @return someOtherVal
*/
function fnA( val ){
//Do something with val....
return someOtherVal
}
//file b.js
var fnA = requires('./a.js');
function fnB() {
var c = fnA(3); //<- not recognized as a function
}
However if I wrap the function in a namespace, it works properly:
//a.js
module.exports = fnA;
/**
* Converts val to someOtherVal
* @param val
* @memberof core
*/
function fnA( val ){
//Do something with val....
return someOtherVal
}
__________________________________________________
//b.js
/**
* @namespace
*/
var core = {
fnA : requires('./a.js')
}
function b() {
var c = core.fnA(3); //Recognized as a function
}
I would like to avoid wrapping the function in a namespace - what is the proper way to jsdoc the function in the first example?
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I'm trying to do two different project requestI am request a using request module other project using express but json parse error in the express project
Just exploring nodejs and came across express; On the npm repository site https://www
I have an issueI have one login pannel when i am trying to login it by right username and password using Node