This repository was archived by the owner on Dec 31, 2017. It is now read-only.
forked from SitePen/js-doc-parse
-
Notifications
You must be signed in to change notification settings - Fork 7
The inline "doc hint" for return value type is not taken into account. #24
Copy link
Copy link
Open
Description
Hi,
It seems the current parser does not take into account the "documentation hint" that may be specified for the return value.
For ex:
bar : function(){
return "asdf";
},
getBarFoo:function(){
// summary:
// adf askdfj asdf asdf asdf
var a = this.bar();
return a; // String
},
which gives:
<method name="bar" scope="prototype" type="function" from="dojox/geo/openlayers/Map">
<parameters/>
<return-types>
<return-type type="string"/>
</return-types>
</method>
<method name="getBarFoo" scope="prototype" type="function" from="dojox/geo/openlayers/Map">
<parameters/>
<return-types>
<return-type type="undefined"/>
</return-types>
<summary>adf askdfj asdf asdf asdf</summary>
</method>
Also, if the keywod "returns" is used, it adds an extra any element:
bar : function(){
// summary:
// adf asdf alsfqwe
// returns:
// something interesting.
return "asdf";
},
gives:
<method name="bar" scope="prototype" type="function" from="dojox/geo/openlayers/Map">
<parameters/>
<return-types>
<return-type type="any"/>
<return-type type="string"/>
</return-types>
<return-description>something interesting.</return-description>
<summary>adf asdf alsfqwe</summary>
</method>
cc @cjolif