diff --git a/lib/flatten.js b/lib/flatten.js index fe904ce..4d6e350 100644 --- a/lib/flatten.js +++ b/lib/flatten.js @@ -36,6 +36,7 @@ var flatteners = { 'member': flattenTypedName, 'module': flattenTypedName, 'namespace': flattenTypedName, + 'typedef': flattenTypedName, 'kind': function (result, tag) { result.kind = tag.kind; }, @@ -98,12 +99,6 @@ var flatteners = { }, 'private': function (result) { result.access = 'private'; - }, - 'typedef': function (result, tag) { - result.typedef = { - name: tag.description, - type: tag.type - }; } }; diff --git a/package.json b/package.json index d244274..d4a5ebf 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "babylon": "^5.8.23", "brfs": "^1.4.0", "concat-stream": "^1.5.0", - "doctrine": "^0.6.4", + "doctrine": "^0.7.0", "documentation-theme-default": "^1.0.0-alpha2", "extend": "^3.0.0", "get-comments": "^1.0.1", diff --git a/test/fixture/typedef.output.json b/test/fixture/typedef.output.json index 4817e61..c1c47c1 100644 --- a/test/fixture/typedef.output.json +++ b/test/fixture/typedef.output.json @@ -10,12 +10,13 @@ }, { "title": "typedef", - "description": "MyType", + "description": null, "lineNumber": 3, "type": { "type": "NameExpression", "name": "Object" - } + }, + "name": "MyType" }, { "title": "property",