From 24ac6482f9ec35f018d09fa9cc34a2b3066f05fd Mon Sep 17 00:00:00 2001
From: Tom MacWright
+ Type:
+ <%= formatType(section.type) %>
+
Extends
diff --git a/lib/output/markdown_ast.js b/lib/output/markdown_ast.js
index 13080416e..76d0df055 100644
--- a/lib/output/markdown_ast.js
+++ b/lib/output/markdown_ast.js
@@ -43,6 +43,14 @@ function commentsToAST(comments, options, callback) {
*/
function generate(depth, comment) {
+ function typeSection(comment) {
+ return comment.type && u('paragraph', [
+ u('text', 'Type: ')
+ ].concat(
+ formatType(comment.type)
+ ));
+ }
+
function paramList(params) {
return u('list', { ordered: false }, params.map(function (param) {
return u('listItem', [
@@ -176,6 +184,7 @@ function commentsToAST(comments, options, callback) {
.concat(githubLink(comment))
.concat(augmentsLink(comment))
.concat(comment.description ? comment.description.children : [])
+ .concat(typeSection(comment))
.concat(paramSection(comment))
.concat(propertySection(comment))
.concat(examplesSection(comment))
diff --git a/test/fixture/document-exported.output.md b/test/fixture/document-exported.output.md
index 050ee4474..e6743fe0c 100644
--- a/test/fixture/document-exported.output.md
+++ b/test/fixture/document-exported.output.md
@@ -34,6 +34,8 @@
# T5
+Type: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
+
# y2Default
# y4
@@ -68,10 +70,16 @@ Returns **void**
# T
+Type: [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
+
# T2
+Type: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
+
# T4
+Type: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
+
# f4
**Parameters**
diff --git a/test/fixture/document-exported.output.md.json b/test/fixture/document-exported.output.md.json
index ea3cff981..4ccd7a6af 100644
--- a/test/fixture/document-exported.output.md.json
+++ b/test/fixture/document-exported.output.md.json
@@ -226,6 +226,26 @@
}
]
},
+ {
+ "type": "paragraph",
+ "children": [
+ {
+ "type": "text",
+ "value": "Type: "
+ },
+ {
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
+ "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
+ "type": "link",
+ "children": [
+ {
+ "type": "text",
+ "value": "boolean"
+ }
+ ]
+ }
+ ]
+ },
{
"depth": 1,
"type": "heading",
@@ -483,6 +503,26 @@
}
]
},
+ {
+ "type": "paragraph",
+ "children": [
+ {
+ "type": "text",
+ "value": "Type: "
+ },
+ {
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
+ "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
+ "type": "link",
+ "children": [
+ {
+ "type": "text",
+ "value": "number"
+ }
+ ]
+ }
+ ]
+ },
{
"depth": 1,
"type": "heading",
@@ -493,6 +533,26 @@
}
]
},
+ {
+ "type": "paragraph",
+ "children": [
+ {
+ "type": "text",
+ "value": "Type: "
+ },
+ {
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
+ "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
+ "type": "link",
+ "children": [
+ {
+ "type": "text",
+ "value": "string"
+ }
+ ]
+ }
+ ]
+ },
{
"depth": 1,
"type": "heading",
@@ -503,6 +563,26 @@
}
]
},
+ {
+ "type": "paragraph",
+ "children": [
+ {
+ "type": "text",
+ "value": "Type: "
+ },
+ {
+ "href": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
+ "url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
+ "type": "link",
+ "children": [
+ {
+ "type": "text",
+ "value": "string"
+ }
+ ]
+ }
+ ]
+ },
{
"depth": 1,
"type": "heading",
diff --git a/test/fixture/html/nested.config-output.html b/test/fixture/html/nested.config-output.html
index 470ecf382..a31473185 100644
--- a/test/fixture/html/nested.config-output.html
+++ b/test/fixture/html/nested.config-output.html
@@ -258,6 +258,8 @@
Extends
@@ -321,6 +323,8 @@
Extends
@@ -283,6 +285,8 @@ This is a [link to something that does not exist]DoesNot
+
+
@@ -358,6 +362,8 @@ the referenced class type
+
+
@@ -396,6 +400,8 @@
+
+
@@ -462,6 +468,8 @@
+
+
@@ -538,6 +546,8 @@
+
+
@@ -612,6 +622,8 @@
+
+
@@ -657,6 +669,8 @@
+
+
@@ -710,6 +724,8 @@
+
+
@@ -770,6 +786,8 @@
+
+
@@ -875,6 +893,8 @@
+
+
@@ -949,6 +969,8 @@
+
+
@@ -1003,6 +1025,8 @@
+
+
@@ -1072,6 +1096,8 @@
+
+
@@ -1125,6 +1151,8 @@
+
+
@@ -1167,6 +1195,8 @@
+
+
@@ -1220,6 +1250,8 @@
+
+
diff --git a/test/fixture/html/nested.output.files b/test/fixture/html/nested.output.files
index 9c9e5725a..c9a7449d0 100644
--- a/test/fixture/html/nested.output.files
+++ b/test/fixture/html/nested.output.files
@@ -220,6 +220,8 @@
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: