Fix the indent for the parameter and typeparameter emit in .d.ts file

This commit is contained in:
Sheetal Nandi
2014-08-14 09:38:22 -07:00
parent b8bbb0d547
commit c949543f49
7 changed files with 23 additions and 19 deletions

View File

@@ -2260,7 +2260,9 @@ module ts {
};
}
increaseIndent();
emitJsDocComments(node);
decreaseIndent();
emitSourceTextOfNode(node.name);
// If there is constraint present and this is not a type parameter of the private method emit the constraint
if (node.constraint && (node.parent.kind !== SyntaxKind.Method || !(node.parent.flags & NodeFlags.Private))) {
@@ -2647,6 +2649,7 @@ module ts {
}
function emitParameterDeclaration(node: ParameterDeclaration) {
increaseIndent();
emitJsDocComments(node);
if (node.flags & NodeFlags.Rest) {
write("...");
@@ -2655,6 +2658,7 @@ module ts {
if (node.initializer || (node.flags & NodeFlags.QuestionMark)) {
write("?");
}
decreaseIndent();
if (!(node.parent.flags & NodeFlags.Private)) {
write(": ");