File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ namespace ts.NavigationBar {
194
194
// Handle named bindings in imports e.g.:
195
195
// import * as NS from "mod";
196
196
// import {a, b as B} from "mod";
197
- const { namedBindings} = importClause ;
197
+ const { namedBindings } = importClause ;
198
198
if ( namedBindings ) {
199
199
if ( namedBindings . kind === SyntaxKind . NamespaceImport ) {
200
200
addLeafNode ( namedBindings ) ;
@@ -660,7 +660,16 @@ namespace ts.NavigationBar {
660
660
else if ( isCallExpression ( parent ) ) {
661
661
const name = getCalledExpressionName ( parent . expression ) ;
662
662
if ( name !== undefined ) {
663
- const args = mapDefined ( parent . arguments , a => isStringLiteralLike ( a ) ? a . getText ( curSourceFile ) : undefined ) . join ( ", " ) ;
663
+ const args = mapDefined ( parent . arguments , a => {
664
+ if ( isStringLiteralLike ( a ) ) {
665
+ const line = curSourceFile . getLineAndCharacterOfPosition ( a . pos ) . line ;
666
+ const endOfLine = getEndLinePosition ( line , curSourceFile ) ;
667
+
668
+ return a . getText ( curSourceFile ) . substring ( 0 , endOfLine - a . pos ) ;
669
+ }
670
+
671
+ return undefined ;
672
+ } ) . join ( ", " ) ;
664
673
return `${ name } (${ args } ) callback` ;
665
674
}
666
675
}
You can’t perform that action at this time.
0 commit comments