diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/method.tmpl | |
parent | Initial commit. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/method.tmpl | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/method.tmpl b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/method.tmpl new file mode 100644 index 00000000..1eb9032d --- /dev/null +++ b/web/server/h2o/libh2o/misc/oktavia/templates/jsdoc3/tmpl/method.tmpl @@ -0,0 +1,76 @@ +<?js +var data = obj; +var self = this; +?> +<dt> + <h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '') + name + (kind !== 'event' ? data.signature : '') ?></h4> + + <?js if (data.summary) { ?> + <p class="summary"><?js= summary ?></p> + <?js } ?> +</dt> +<dd> + + <?js if (data.description) { ?> + <div class="description"> + <?js= data.description ?> + </div> + <?js } ?> + + <?js if (kind === 'event' && data.type && data.type.names) {?> + <h5>Type:</h5> + <ul> + <li> + <?js= self.partial('type.tmpl', data.type.names) ?> + </li> + </ul> + <?js } ?> + + <?js if (data['this']) { ?> + <h5>This:</h5> + <ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul> + <?js } ?> + + <?js if (data.params && params.length) { ?> + <h5>Parameters:</h5> + <?js= this.partial('params.tmpl', params) ?> + <?js } ?> + + <?js= this.partial('details.tmpl', data) ?> + + <?js if (data.fires && fires.length) { ?> + <h5>Fires:</h5> + <ul><?js fires.forEach(function(f) { ?> + <?js= self.partial('fires.tmpl', self.linkto(f) ) ?> + <?js }); ?></ul> + <?js } ?> + + <?js if (data.exceptions && exceptions.length) { ?> + <h5>Throws:</h5> + <?js if (exceptions.length > 1) { ?><ul><?js + exceptions.forEach(function(r) { ?> + <li><?js= self.partial('exceptions.tmpl', r) ?></li> + <?js }); + ?></ul><?js } else { + exceptions.forEach(function(r) { ?> + <?js= self.partial('exceptions.tmpl', r) ?> + <?js }); + } } ?> + + <?js if (data.returns && returns.length) { ?> + <h5>Returns:</h5> + <?js if (returns.length > 1) { ?><ul><?js + returns.forEach(function(r) { ?> + <li><?js= self.partial('returns.tmpl', r) ?></li> + <?js }); + ?></ul><?js } else { + returns.forEach(function(r) { ?> + <?js= self.partial('returns.tmpl', r) ?> + <?js }); + } } ?> + + <?js if (data.examples && examples.length) { ?> + <h5>Example<?js= examples.length > 1? 's':'' ?></h5> + <?js= this.partial('examples.tmpl', examples) ?> + <?js } ?> +</dd> |