Does anyone know or has a JSDOC definition library I can use for SS2.0??
The current one I have for SS1.0 looks like the one below, and I use it to plug into my IDE
You may consider what I did which there is no need to download other plugins.
You will be able to enable the code assist if you have the copy of SS2.0 API and then use "@param" and "@type" JSDOC tag.
Then, there will be suggestion every time you type then 'CTRL' + 'SPACE".
Aside from that, your IDE will also provide description for each function.
So this is what will you do.
Next to enable the code assist for object constructor APIs of SS2.0 like 'N/record' and 'N/search' modules, we should be adding "@param" JSDoc tag on each function declaration.
So if we are going to use the 'N/record', 'N/search' and 'N/error' modules in our script, we should have below sample comments before function declaration. But please take note that it should match the value inside the "{[VALUE HERE]}" tag and the module name. Also the variable name on the comment section and function declaration.
/**
* Do something.
*
* @param {record} objRec
* @param {search} objSearch
* @param {error} objError
*
*/
function doSomething(objRec, objSearch, objError)
{
//CODE HERE
}
You may also use '@type' for your variable declaration. Below is the sample code.
/**
* Do something.
*
*/
function doSomething()
{
/*** @type record**/
var recCustomerRefund = record.create(
{
type : 'customerrefund',
isDynamic : true
});
}