UNPKG

dgeni-packages

Version:

A collection of dgeni packages for generating documentation from source code

16 lines 606 B
module.exports = function(createDocMessage) { return { name: 'memberof', defaultFn(doc) { if ( doc.docType === 'event' || doc.docType === 'property' || doc.docType === 'method' ) { throw new Error(createDocMessage('Missing tag "@memberof" for doc of type "'+ doc.docType, doc)); } }, transforms(doc, tag, value) { if ( !(doc.docType === 'event' || doc.docType === 'property' || doc.docType === 'method') ) { throw new Error(createDocMessage('"@'+ tag.name +'" tag found on non-'+ doc.docType +' document', doc)); } return value; } }; };