File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed
Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -756,10 +756,7 @@ namespace FourSlash {
756756
757757 public verifyCompletionListIsGlobal ( expected : boolean ) {
758758 const completions = this . getCompletionListAtCaret ( ) ;
759- if ( ! completions && expected !== undefined ) {
760- this . raiseError ( `verifyCompletionListIsGlobal failed - expected result to be ${ completions } ` ) ;
761- }
762- else if ( completions && completions . isGlobalCompletion !== expected ) {
759+ if ( completions && completions . isGlobalCompletion !== expected ) {
763760 this . raiseError ( `verifyCompletionListIsGlobal failed - expected result to be ${ completions . isGlobalCompletion } ` ) ;
764761 }
765762 }
Original file line number Diff line number Diff line change @@ -886,7 +886,7 @@ namespace ts.Completions {
886886 }
887887
888888 const semanticStart = timestamp ( ) ;
889- let isGlobalCompletion : boolean ;
889+ let isGlobalCompletion = false ;
890890 let isMemberCompletion : boolean ;
891891 let isNewIdentifierLocation : boolean ;
892892 let symbols : Symbol [ ] = [ ] ;
@@ -902,7 +902,6 @@ namespace ts.Completions {
902902 else {
903903 symbols = tagSymbols ;
904904 }
905- isGlobalCompletion = false ;
906905 isMemberCompletion = true ;
907906 isNewIdentifierLocation = false ;
908907 }
@@ -913,7 +912,6 @@ namespace ts.Completions {
913912 if ( ! typeChecker . isUnknownSymbol ( tagSymbol ) ) {
914913 symbols = [ tagSymbol ] ;
915914 }
916- isGlobalCompletion = false ;
917915 isMemberCompletion = true ;
918916 isNewIdentifierLocation = false ;
919917 }
Original file line number Diff line number Diff line change 2323goTo . marker ( "1" ) ;
2424verify . completionListIsGlobal ( false ) ;
2525goTo . marker ( "2" ) ;
26- verify . completionListIsGlobal ( undefined ) ;
26+ verify . completionListIsGlobal ( false ) ;
2727goTo . marker ( "3" ) ;
28- verify . completionListIsGlobal ( undefined ) ;
28+ verify . completionListIsGlobal ( false ) ;
2929goTo . marker ( "4" ) ;
3030verify . completionListIsGlobal ( true ) ;
3131goTo . marker ( "5" ) ;
32- verify . completionListIsGlobal ( undefined ) ;
32+ verify . completionListIsGlobal ( false ) ;
3333goTo . marker ( "6" ) ;
3434verify . completionListIsGlobal ( true ) ;
3535goTo . marker ( "7" ) ;
36- verify . completionListIsGlobal ( undefined ) ;
36+ verify . completionListIsGlobal ( false ) ;
3737goTo . marker ( "8" ) ;
3838verify . completionListIsGlobal ( false ) ;
3939goTo . marker ( "9" ) ;
You can’t perform that action at this time.
0 commit comments