mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
simplified docParams
This commit is contained in:
parent
400fc30e9d
commit
3e59651152
@ -6845,9 +6845,9 @@ namespace ts {
|
||||
// TODO: call a helper method instead once PR #4133 gets merged in.
|
||||
const newLine = host.getNewLine ? host.getNewLine() : "\r\n";
|
||||
|
||||
let docParams = parameters.map((p, index) =>
|
||||
indentationStr + " * @param " + (p.name.kind === SyntaxKind.Identifier ? (<Identifier>p.name).text : "param" + index) + newLine);
|
||||
|
||||
let docParams = parameters.reduce((prev, cur, index) =>
|
||||
prev +
|
||||
indentationStr + " * @param " + (cur.name.kind === SyntaxKind.Identifier ? (<Identifier>cur.name).text : "param" + index) + newLine, "");
|
||||
|
||||
// A doc comment consists of the following
|
||||
// * The opening comment line
|
||||
@ -6860,7 +6860,7 @@ namespace ts {
|
||||
indentationStr + " * ";
|
||||
let result =
|
||||
preamble + newLine +
|
||||
docParams.join("") +
|
||||
docParams +
|
||||
indentationStr + " */" +
|
||||
(tokenStart === position ? newLine + indentationStr : "");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user