I have following function:
function carModel() {
return {
brand: "NIO",
model: "ET5"
}
}
I need documenting a returned carModel()
in another function:
/**
* @returns {carModel}
*/
function another() {
//some unpredictable code but returned as invoked carModel()
}
But I can’t using another function by JSDoc as expected, need extra ()
.
Must call like this to work by JSDoc:
another()().brand
I need call another function by JSDoc like this:
another().brand