diff --git a/plugin/doc_comment.js b/plugin/doc_comment.js index 80660680..e3adcae2 100644 --- a/plugin/doc_comment.js +++ b/plugin/doc_comment.js @@ -304,6 +304,9 @@ if (str.charAt(pos++) != ">") return null; val.type.propagate(type.defProp("")); } + } else if(/^function$/i.test(word)) { + // TODO : support for args parameter types + return types + "this" + type = new infer.Fn(null, infer.ANull, [], [], infer.ANull); } else { while (str.charCodeAt(pos) == 46 || acorn.isIdentifierChar(str.charCodeAt(pos))) ++pos;