From 4c7d5c7da7cd876933be0fbe45a247021245f7ba Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 22 Mar 2019 12:19:20 +1300 Subject: [PATCH] Detect signal functions based on their return type --- tools/jsdoc/plugins/hifi.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/jsdoc/plugins/hifi.js b/tools/jsdoc/plugins/hifi.js index b4350ddbdb..bd77204347 100644 --- a/tools/jsdoc/plugins/hifi.js +++ b/tools/jsdoc/plugins/hifi.js @@ -121,6 +121,11 @@ exports.handlers = { e.doclet.description = (e.doclet.description ? e.doclet.description : "") + availableIn; } } + + if (e.doclet.kind === "function" && e.doclet.returns && e.doclet.returns[0].type + && e.doclet.returns[0].type.names[0] === "Signal") { + e.doclet.kind = "signal"; + } } }; @@ -178,4 +183,4 @@ exports.defineTags = function (dictionary) { } }); -}; \ No newline at end of file +};