Add some comments to isIndentationPrevented

This commit is contained in:
SaschaNaz
2015-09-10 02:31:27 +09:00
parent feae0f711a
commit ad010ea8ee
+4 -1
View File
@@ -478,12 +478,15 @@ namespace ts.formatting {
}
}
/**
* Function returns true if a node should not get additional indentation in its parent node.
*/
export function isIndentationPrevented(node: TextRangeWithKind) {
switch (node.kind) {
case SyntaxKind.NamedExports:
return true;
// NamedImports has its own braces as Block does
case SyntaxKind.ImportClause:
// NamedImports has its own braces as Block does
return (<ImportClause>node).namedBindings.kind === SyntaxKind.NamedImports;
}
return false;