File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1183,7 +1183,7 @@ namespace ts.Completions {
11831183 const isTypeOnly = isTypeOnlyCompletion ( ) ;
11841184 const allowTypes = isTypeOnly || ! isContextTokenValueLocation ( contextToken ) && isPossiblyTypeArgumentPosition ( contextToken , sourceFile , typeChecker ) ;
11851185 if ( isTypeOnly ) {
1186- keywordFilters = isInsideTypeAssertion ( )
1186+ keywordFilters = isTypeAssertion ( )
11871187 ? KeywordCompletionFilters . TypeAssertionKeywords
11881188 : KeywordCompletionFilters . TypeKeywords ;
11891189 }
@@ -1216,8 +1216,8 @@ namespace ts.Completions {
12161216 } ) ;
12171217 }
12181218
1219- function isInsideTypeAssertion ( ) : boolean {
1220- return isAsExpression ( contextToken . parent ) ;
1219+ function isTypeAssertion ( ) : boolean {
1220+ return isAssertionExpression ( contextToken . parent ) ;
12211221 }
12221222
12231223 function isTypeOnlyCompletion ( ) : boolean {
@@ -1249,6 +1249,9 @@ namespace ts.Completions {
12491249
12501250 case SyntaxKind . ExtendsKeyword :
12511251 return parentKind === SyntaxKind . TypeParameter ;
1252+
1253+ case SyntaxKind . LessThanToken :
1254+ return parentKind === SyntaxKind . TypeAssertionExpression ;
12521255 }
12531256 }
12541257 return false ;
You can’t perform that action at this time.
0 commit comments