mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
minor cleanup
This commit is contained in:
parent
5fa636ab7b
commit
c0b7b784a2
@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var hasOwnProp = Object.prototype.hasOwnProperty;
|
var _ = require('underscore');
|
||||||
var jsdoc = {
|
var jsdoc = {
|
||||||
name: require('jsdoc/name'),
|
name: require('jsdoc/name'),
|
||||||
src: {
|
src: {
|
||||||
@ -24,6 +24,8 @@ var jsdoc = {
|
|||||||
var path = require('jsdoc/path');
|
var path = require('jsdoc/path');
|
||||||
var Syntax = require('jsdoc/src/syntax').Syntax;
|
var Syntax = require('jsdoc/src/syntax').Syntax;
|
||||||
|
|
||||||
|
var hasOwnProp = Object.prototype.hasOwnProperty;
|
||||||
|
|
||||||
var DEFINITIONS = {
|
var DEFINITIONS = {
|
||||||
closure: 'closureTags',
|
closure: 'closureTags',
|
||||||
jsdoc: 'jsdocTags'
|
jsdoc: 'jsdocTags'
|
||||||
@ -31,11 +33,11 @@ var DEFINITIONS = {
|
|||||||
var NAMESPACES = jsdoc.name.NAMESPACES;
|
var NAMESPACES = jsdoc.name.NAMESPACES;
|
||||||
|
|
||||||
// Clone a tag definition, excluding synonyms.
|
// Clone a tag definition, excluding synonyms.
|
||||||
function cloneTagDef(tagDef) {
|
function cloneTagDef(tagDef, extras) {
|
||||||
var newTagDef = jsdoc.util.doop(tagDef);
|
var newTagDef = jsdoc.util.doop(tagDef);
|
||||||
delete newTagDef.synonyms;
|
delete newTagDef.synonyms;
|
||||||
|
|
||||||
return newTagDef;
|
return (extras ? _.extend(newTagDef, extras) : newTagDef);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSourcePaths() {
|
function getSourcePaths() {
|
||||||
@ -804,11 +806,9 @@ var closureTags = exports.closureTags = {
|
|||||||
return: cloneTagDef(baseTags.returns),
|
return: cloneTagDef(baseTags.returns),
|
||||||
'this': cloneTagDef(baseTags['this']),
|
'this': cloneTagDef(baseTags['this']),
|
||||||
throws: cloneTagDef(baseTags.throws),
|
throws: cloneTagDef(baseTags.throws),
|
||||||
type: (function() {
|
type: cloneTagDef(baseTags.type, {
|
||||||
var tagDef = cloneTagDef(baseTags.type);
|
mustNotHaveDescription: false
|
||||||
tagDef.mustNotHaveDescription = false;
|
}),
|
||||||
return tagDef;
|
|
||||||
})(),
|
|
||||||
typedef: cloneTagDef(baseTags.typedef)
|
typedef: cloneTagDef(baseTags.typedef)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user