Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created November 11, 2016 15:54
Show Gist options
  • Save tmcw/27b6f2b631050148c00b5767cab46320 to your computer and use it in GitHub Desktop.
Save tmcw/27b6f2b631050148c00b5767cab46320 to your computer and use it in GitHub Desktop.
shortSignature: function (section) {
var prefix = '';
if (section.kind === 'class') {
prefix = 'new ';
} else if (section.kind !== 'function') {
return section.name;
}
return prefix + section.name + formatters.parameters(section, true);
},
signature: function (section) {
var returns = '';
var prefix = '';
if (section.kind === 'class') {
prefix = 'new ';
} else if (section.kind !== 'function') {
return section.name;
}
if (section.returns) {
returns = ': ' +
formatters.type(section.returns[0].type);
}
return prefix + section.name + formatters.parameters(section) + returns;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment