fel*_*ang 2 netsuite suitescript
有谁知道或有一个我可以用于SS2.0的JSDOC定义库?
我对SS1.0的当前版本如下所示,我用它来插入我的IDE并获得自动完成功能.
/** * Loads an existing saved search. The saved search could have been created using the UI, or created using nlapiCreateSearch(type, filters, columns) in conjunction with nlobjSearch.saveSearch(title, scriptId).
*<br>API Governance: 5
* @param {String} recType [optional] - The record internal ID of the record type you are searching (for example, customer|lead|prospect|partner|vendor|contact). This parameter is case-insensitive.
* @param {String} searchId - The internal ID or script ID of the saved search. The script ID of the saved search is required, regardless of whether you specify the search type. If you do not specify the search type, you must set type to null and then set the script/search ID.
* @returns {nlobjSearch} nlobjSearch
* @since 2012.1 */
function nlapiLoadSearch(recType, searchId) { };
Run Code Online (Sandbox Code Playgroud)
这不是一个技术问题,但对每个人都会派上用场.
你可以考虑我做了什么,没有必要下载其他插件.
如果您拥有SS2.0 API的副本,然后使用"@param"和"@type"JSDOC标记,您将能够启用代码帮助.
然后,每次键入"CTRL"+"SPACE"时都会有建议.
除此之外,你的IDE还会提供每个函数的描述.
这就是你要做的.

接下来为SS2.0的对象构造函数API启用代码辅助,如'N/record'和'N/search'模块,我们应该在每个函数声明上添加"@param"JSDoc标记.
所以,如果我们要使用"N /记录","N /搜索",并在我们的脚本"N /错误"模块,我们应该有低于之前的函数声明样品的意见.但请注意,它应该匹配"{[VALUE HERE]}"标记内的值和模块名称.还有注释部分和函数声明中的变量名称.
/**
* Do something.
*
* @param {record} objRec
* @param {search} objSearch
* @param {error} objError
*
*/
function doSomething(objRec, objSearch, objError)
{
//CODE HERE
}
Run Code Online (Sandbox Code Playgroud)
您也可以使用'@type'作为变量声明.下面是示例代码.
/**
* Do something.
*
*/
function doSomething()
{
/*** @type record**/
var recCustomerRefund = record.create(
{
type : 'customerrefund',
isDynamic : true
});
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3183 次 |
| 最近记录: |