Skip to content
Permalink
Browse files

Correct outline hint spans for functions

  • Loading branch information...
amcasey committed Jun 11, 2019
1 parent cf7b19a commit fdacf7f87a8bfaeb1d0c5f5e198468dc96237427
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/services/outliningElementsCollector.ts
@@ -237,7 +237,7 @@ namespace ts.OutliningElementsCollector {
? findChildOfKind(node, SyntaxKind.OpenParenToken, sourceFile)
: findChildOfKind(body, SyntaxKind.OpenBraceToken, sourceFile);
const closeToken = findChildOfKind(body, SyntaxKind.CloseBraceToken, sourceFile);
return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node.parent, sourceFile, /*autoCollapse*/ node.parent.kind !== SyntaxKind.ArrowFunction);
return openToken && closeToken && spanBetweenTokens(openToken, closeToken, node, sourceFile, /*autoCollapse*/ node.kind !== SyntaxKind.ArrowFunction);
}

function spanBetweenTokens(openToken: Node, closeToken: Node, hintSpanNode: Node, sourceFile: SourceFile, autoCollapse = false, useFullStart = true): OutliningSpan {

0 comments on commit fdacf7f

Please sign in to comment.
You can’t perform that action at this time.