mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
show type of events; link to type of return values (#192)
This commit is contained in:
parent
0a199914a1
commit
c20f399d1d
@ -4,18 +4,13 @@
|
||||
</div>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data.type && data.type.names) { ?>
|
||||
<?js if (data.type) {?>
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
<?js
|
||||
var typeNames = data.type.names,
|
||||
self = this;
|
||||
typeNames.forEach(function(name, i) { ?>
|
||||
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span> <?js if (i < typeNames.length-1) { ?>|<?js } ?>
|
||||
<?js }); ?>
|
||||
<?js= self.partial('type.tmpl', data.type) ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?js } ?>
|
||||
@ -14,6 +14,15 @@
|
||||
</div>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (kind === 'event' && data.type) {?>
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
<?js= self.partial('type.tmpl', data.type) ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?js } ?>
|
||||
|
||||
<?js if (data['this']) { ?>
|
||||
<h5>This:</h5>
|
||||
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
|
||||
|
||||
@ -72,14 +72,9 @@
|
||||
<?js } ?>
|
||||
|
||||
<td class="type">
|
||||
<?js
|
||||
if (param.type && param.type.names) {
|
||||
param.type.names.forEach(function(name, i) { ?>
|
||||
<?js= self.linkto(name, self.htmlsafe(name)) ?>
|
||||
<?js if (i < param.type.names.length-1) { ?> | <?js } ?>
|
||||
<?js });
|
||||
}
|
||||
?>
|
||||
<?js if (param.type) {?>
|
||||
<?js= self.partial('type.tmpl', param.type) ?>
|
||||
<?js } ?>
|
||||
</td>
|
||||
|
||||
<?js if (params.hasAttributes) {?>
|
||||
|
||||
@ -72,14 +72,9 @@
|
||||
<?js } ?>
|
||||
|
||||
<td class="type">
|
||||
<?js
|
||||
if (prop.type && prop.type.names) {
|
||||
prop.type.names.forEach(function(name, i) { ?>
|
||||
<?js= self.linkto(name, self.htmlsafe(name)) ?>
|
||||
<?js if (i < prop.type.names.length-1) { ?> | <?js } ?>
|
||||
<?js });
|
||||
}
|
||||
?>
|
||||
<?js if (prop.type) {?>
|
||||
<?js= self.partial('type.tmpl', prop.type) ?>
|
||||
<?js } ?>
|
||||
</td>
|
||||
|
||||
<?js if (props.hasAttributes) {?>
|
||||
|
||||
@ -4,24 +4,13 @@
|
||||
</div>
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
if (data.type) {
|
||||
with(type) {
|
||||
?>
|
||||
|
||||
<?js if (data.type) {?>
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
<?js
|
||||
var self = this;
|
||||
names.forEach(function(name, i) { ?>
|
||||
<span class="param-type"><?js= self.htmlsafe(name) ?></span> <?js if (i < names.length-1) { ?>|<?js } ?>
|
||||
<?js }); ?>
|
||||
<?js= this.partial('type.tmpl', data.type) ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?js
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?js } ?>
|
||||
9
templates/default/tmpl/type.tmpl
Normal file
9
templates/default/tmpl/type.tmpl
Normal file
@ -0,0 +1,9 @@
|
||||
<?js if (data.names) { ?>
|
||||
<?js
|
||||
var names = data.names,
|
||||
self = this;
|
||||
names.forEach(function(name, i) { ?>
|
||||
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span>
|
||||
<?js if (i < names.length-1) { ?>|<?js } ?>
|
||||
<?js }); ?>
|
||||
<?js } ?>
|
||||
Loading…
x
Reference in New Issue
Block a user