File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -1464,7 +1464,7 @@ namespace ts.Completions {
1464
1464
function filterGlobalCompletion ( symbols : Symbol [ ] ) : void {
1465
1465
const isTypeOnly = isTypeOnlyCompletion ( ) ;
1466
1466
if ( isTypeOnly ) {
1467
- keywordFilters = isTypeAssertion ( )
1467
+ keywordFilters = contextToken && isAssertionExpression ( contextToken . parent )
1468
1468
? KeywordCompletionFilters . TypeAssertionKeywords
1469
1469
: KeywordCompletionFilters . TypeKeywords ;
1470
1470
}
@@ -1494,10 +1494,6 @@ namespace ts.Completions {
1494
1494
} ) ;
1495
1495
}
1496
1496
1497
- function isTypeAssertion ( ) : boolean {
1498
- return isAssertionExpression ( contextToken . parent ) ;
1499
- }
1500
-
1501
1497
function isTypeOnlyCompletion ( ) : boolean {
1502
1498
return insideJsDocTagTypeExpression
1503
1499
|| ! isContextTokenValueLocation ( contextToken ) &&
Original file line number Diff line number Diff line change
1
+ // @noLib : true
2
+
3
+ /// <reference path='fourslash.ts'/>
4
+
5
+ // fix crash from #38407
6
+
7
+ //// /**
8
+ //// * @returns {modu/*1*/le:ControlFlow }
9
+ //// */
10
+ //// export function cargo() {
11
+ //// }
12
+
13
+ goTo . marker ( '1' ) ;
14
+ verify . completions ( { marker : "1" , excludes : [ "module" , "ControlFlow" ] } ) ;
15
+
You can’t perform that action at this time.
0 commit comments