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 {
14641464 function filterGlobalCompletion ( symbols : Symbol [ ] ) : void {
14651465 const isTypeOnly = isTypeOnlyCompletion ( ) ;
14661466 if ( isTypeOnly ) {
1467- keywordFilters = isTypeAssertion ( )
1467+ keywordFilters = contextToken && isAssertionExpression ( contextToken . parent )
14681468 ? KeywordCompletionFilters . TypeAssertionKeywords
14691469 : KeywordCompletionFilters . TypeKeywords ;
14701470 }
@@ -1494,10 +1494,6 @@ namespace ts.Completions {
14941494 } ) ;
14951495 }
14961496
1497- function isTypeAssertion ( ) : boolean {
1498- return isAssertionExpression ( contextToken . parent ) ;
1499- }
1500-
15011497 function isTypeOnlyCompletion ( ) : boolean {
15021498 return insideJsDocTagTypeExpression
15031499 || ! 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