Hi, experts
I have some trouble when I want to write the JSDoc with sapui5 in vscode. (i think also in WebIDE, but I really prefer to use vscode.)
In my code, I describe the function with JSDoc like this.
// MasterDataDialog.js
sap.ui.define([
...
], function (...) {
"use strict";
return {
/**
* add function
* @param {number} num1 number 1
* @param {number} num2 number 2
* @returns {number} the result
*/
_add: function (num1, num2) {
return num1 + num2
},
/**
* calc function
* @param {number} num1 number 1
* @param {number} num2 number 2
* @returns {number} the result
*/
calc: function (num1, num2) {
return this._add(num1, num2)
},
...
}
})
And in this js file, the JSDoc works well when I hover my mouse on the function name.

But when I import it into my controller file with sap.ui.define(), it does not work.
// xxx.controller.js
sap.ui.define([
"./MyController",
"./MasterDataDialog", // this is the helper class I define before
...
], function (MyController, MasterDataDialog, ...) {
return MyController.extend("....controller.xxx", {
onInit: function () {
MasterDataDialog.calc() // here I call the function but no tips from JSDoc
...
},
}
}
<br>

Please help me to deal with the problem. Thank you!
Request clarification before answering.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.