File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -703,6 +703,14 @@ namespace ts.Completions {
703
703
case SyntaxKind . PropertyAccessExpression :
704
704
propertyAccessToConvert = parent as PropertyAccessExpression ;
705
705
node = propertyAccessToConvert . expression ;
706
+ if ( node . end === contextToken . pos &&
707
+ isCallExpression ( node ) &&
708
+ node . getChildCount ( sourceFile ) &&
709
+ last ( node . getChildren ( sourceFile ) ) . kind !== SyntaxKind . CloseParenToken ) {
710
+ // This is likely dot from incorrectly parsed call expression and user is starting to write spread
711
+ // eg: Math.min(./**/)
712
+ return undefined ;
713
+ }
706
714
break ;
707
715
case SyntaxKind . QualifiedName :
708
716
node = ( parent as QualifiedName ) . left ;
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ ////
4
+ //// const [] = [Math.min(./*marker*/)]
5
+ ////
6
+
7
+ goTo . marker ( "marker" ) ;
8
+ verify . completions ( { exact : undefined } ) ;
9
+ edit . insert ( "." ) ;
10
+ verify . completions ( { exact : undefined } ) ;
11
+ edit . insert ( "." ) ;
12
+ verify . completions ( { exact : completion . globals } ) ;
You can’t perform that action at this time.
0 commit comments