ngdoc自定义类型定义

时间:2017-01-26 13:56:57

标签: javascript documentation jsdoc ngdoc

我项目中的指令越来越大,有很多不同的选项

我的一个参数叫做tableFields这个对象有很多可以添加的选项:

要做到这一点,我试图创建一个typedef(类型定义),但没有运气:

/**
 * @typedef tableFields
 * @type {object}
 * @property {String} headerTitle This string is a translate string this will be evaluated to a translate value and then translated
 * @property {Boolean} sortable  True/false value sets if the field is sortable. This will also control if the column can be searched by an external source
 * @property {Boolean} isImage True/false value if true the field will be considered as a path to an image if so the field will be converted to an image and collected from the APP server. Note that you typically do not want to sort this type of field
 * @property {String} fieldKey this key is ALWAYS required it tells the table which key to look for in the tableData object. This key / value is also the one you search for when creating searches.
 * @property {String} combineKey an extra key that allows you to bind two keys into one string
 */


/**
 * @ngdoc directive
 * @name LBTable.directive: lbTable
 * @description
 * Wrapper for a responsive paginated table. creates a table that allows both sorting and searching.
 * Also gives the option to set custom links, callback functions and other important functions
 * @param {array} tableData The data which needs to fill the table (The array must be an array of objects)
 * @param {tableFields} tableFields object

可悲的是,当我生成我的文档时,它只是给了我这个:

enter image description here

所以我的问题是如何指定字段的要求或进行类型定义?

0 个答案:

没有答案