typedoc-plugin-typescript-declaration
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -102,4 +102,4 @@ 'use strict'; | ||
const paramComments = signature.parameters | ||
.filter(p => { var _a; return (_a = p.comment) === null || _a === void 0 ? void 0 : _a.text; }) | ||
.map(p => this.renderMultilineComment(`@param ${p.name}`, p.comment.text)) | ||
.filter(p => { var _a, _b; return ((_a = p.comment) === null || _a === void 0 ? void 0 : _a.text) || ((_b = p.comment) === null || _b === void 0 ? void 0 : _b.shortText); }) | ||
.map(p => { var _a, _b; return this.renderMultilineComment(`@param ${p.name}`, ((_a = p.comment) === null || _a === void 0 ? void 0 : _a.text) || ((_b = p.comment) === null || _b === void 0 ? void 0 : _b.shortText) || ''); }) | ||
.join('\n'); | ||
@@ -728,11 +728,15 @@ if (paramComments.length) { | ||
render(node) { | ||
var _a; | ||
var _a, _b; | ||
const lines = []; | ||
if (node.comment) { | ||
const member = node; | ||
let indent = false; | ||
if (member.signatures && ((_a = member.signatures[0]) === null || _a === void 0 ? void 0 : _a.comment)) { | ||
indent = true; | ||
} | ||
else if (node.comment) { | ||
this.pushIfTruthy(lines, this.renderComment(node)); | ||
} | ||
const member = node; | ||
if (member.children || member.indexSignature) { | ||
const children = [...(member.children || []), member.indexSignature].filter(c => c); | ||
if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.kind) === models.ReflectionKind.TypeAlias) { | ||
if (((_b = node.parent) === null || _b === void 0 ? void 0 : _b.kind) === models.ReflectionKind.TypeAlias) { | ||
const body = this.renderBody(member, 1, ','); | ||
@@ -748,3 +752,8 @@ if (body) { | ||
else if (member.signatures) { | ||
lines.push(ReflectionFormatter.instance().render(member.signatures[0])); | ||
let signature = ReflectionFormatter.instance().render(member.signatures[0]); | ||
if (indent) { | ||
lines.push('\n'); | ||
signature = signature.split('\n').map(l => ` ${l}`).join('\n'); | ||
} | ||
lines.push(signature); | ||
} | ||
@@ -751,0 +760,0 @@ else if (member.name === '__type') { |
{ | ||
"name": "typedoc-plugin-typescript-declaration", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Typedoc plugin to render to typescript declaration file", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64263
1465