show type of events; link to type of return values (#192)

This commit is contained in:
Jeff Williams 2012-09-21 11:11:47 -07:00
parent 0a199914a1
commit c20f399d1d
6 changed files with 29 additions and 37 deletions

View File

@ -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 } ?>

View File

@ -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>

View File

@ -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) {?>

View File

@ -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) {?>

View File

@ -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 } ?>

View 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 } ?>